I have tried various options for my problem but none seems to work for me. I am working in # and have a variable with datatype date with value as {07/03/2013 17:27:02}, now i want this date to be shown as 03-July-2013 but it seems to come out as 07-March-2013.
Bit of code
DateTime publishDate = "07/03/2013 17:27:02"
string publish = publishDate.ToString("dd-MMM-yyyy")
Tried this too: String.Format("{0:MMM d, yyyy}", publishDate )
This is what i am trying, i thought this would be quite simple conversion but i am struck. Can anybody point me in right direction
DateTime publishDate = "07/03/2013 17:27:02"will not compile. You can't just assign astringto aDateTime.