Convert Date to MM/DD/YYYY - VB.net

Unable to convert my date properly...Using VB.net 2003

Have
Dim Currentdate as date
currentdate = Format(Date.Today, "MM/dd/yyyy")

It gives me  Mar 22 2007.  
Need it to do:  03/22/2007
TechMonsterAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
sirbountyConnect With a Mentor Commented:
or try...
currentDate = Format(Now, "MM/dd/yyyy")
0
 
sirbountyCommented:
Why not just

currentDate=Date.Today
?
0
 
sirbountyCommented:
currentDate=Date.Now.ToString("MM/dd/yyyy")

should work otherwise...
0
 
TechMonsterAuthor Commented:
Yeah..I figured out this formula..

currentdate = Format(Now, "d") ' Getting Date.  It gives me what I am looking for.  
I am actually writting this date to a SQL table which when it writes it writes: Mar 22 2007.
So, this is more of a SQL date format...

Thanks anyway..I am sure your code works too.
0
All Courses

From novice to tech pro — start learning today.