Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have the date like "10/31/2011".

I want to convert to "31-Nov-2011" in vb.net.

How to do this...?
Posted

 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 8-Nov-11 12:04pm    
A 5.
--SA
I'm assuming that there's a small typo in your first date: "10/31/2011" is not November.

VB
Dim dt As DateTime = DateTime.Parse("11/31/2011");

Dim dateString As String = dt.ToString("dd-MMM-yyyy")
 
Share this answer
 
Comments
[no name] 8-Nov-11 9:01am    
A typo in yours also. There are only 30 days in November, not 31
jim lahey 8-Nov-11 9:12am    
only 30? This November already feels like forever ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900