July 28th, 2004, 11:00 PM
date format 'dd-Mon-yyyy'???
How can i get the form to return the current date value into this format 'dd-Mon-yyyy' to a textbox??
I try do this but i didnt get the correct month value that i need.
txtDate.Text = Format(Now, "dd-Mon-yyyy")
It will give me this date value instead -> 29-7on-2004.
Can anyone show me the correct way to format a date value? Thanks
July 29th, 2004, 03:04 AM
dd-Mon-yyyy is incorrect
dd-MMM-yyyy is correct
February 26th, 2013, 11:19 PM
DateTime dt = DateTime.Parse("3/9/2008");
string str = dt.ToString("dd-MMM-yyyy") //09-Mar-2008