Click here to Skip to main content
15,892,517 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello!
I am using VB.net 2005
Is there a way i can display a date in this format:
PHP
05/13/2014

without taking the '0' off the month?
Posted
Comments
syed shanu 13-May-14 4:06am    
String.Format("{0:MM/dd/yyyy}", DateTime.Now)

1 solution

Yes:
VB
Dim s As String = DateTime.Now.ToString("dd/MM/yyyy")

See here: Formatting a DateTime for display - format string description[^]
 
Share this answer
 
Comments
charliedev 13-May-14 4:19am    
Nice, thanks :)
OriginalGriff 13-May-14 4:22am    
You're welcome!

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