July 29th, 2004, 12:00 AM
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, 04:04 AM
dd-Mon-yyyy is incorrect
dd-MMM-yyyy is correct
February 27th, 2013, 12:19 AM
DateTime dt = DateTime.Parse("3/9/2008");
string str = dt.ToString("dd-MMM-yyyy") //09-Mar-2008