How to convert 31/03/2011 00:00:00 date format to 31 Mar 2011 in C# -
i have got below date format in result,i using c# 2.0
expirydate = "31/03/2011 00:00:00"; spnexpirydate.innerhtml = expirydate;
now when going show in html should converted 31 mar 2011
format.
please suggest!
first, parse string datetime
, , format using datetime
's tostring
:
datetime mydatetime = datetime.parse( "31/03/2011 00:00:00" ); spnexpirydate.innerhtml = mydatetime.tostring("dd mmm yyyy");
Comments
Post a Comment