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

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -