hi, my code is
-------------------
string demo="01-01-2007 04:59:21 PM";
DateTime dtDate=Convert. ToDateTime(demo );
string strDate = dtDate.ToString ("yyyy-MM-dd hh:mm:ss AM/PM");
-------------------
i want to convert the date in above string (demo) , to 2007-01-01 04:59:21 PM
am or pm is not accepted and also internal server error is displayed. what to do? help me with sample code plz.
-------------------
string demo="01-01-2007 04:59:21 PM";
DateTime dtDate=Convert. ToDateTime(demo );
string strDate = dtDate.ToString ("yyyy-MM-dd hh:mm:ss AM/PM");
-------------------
i want to convert the date in above string (demo) , to 2007-01-01 04:59:21 PM
am or pm is not accepted and also internal server error is displayed. what to do? help me with sample code plz.
Comment