how to write date in this format in c# -


i have date 9/27/2010 8:17:28 pm want write them in format 27 september 2010 8:19 pm how can write in format using c#

use custom datetime format string:

string res = mydate.tostring("d mmmm yyyy h:mm tt", cultureinfo.invariantculture); 

update:

as @jon hanna mentions, format month title case (september), if want in example (september), can add tolowerinvariant() method call.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -