What is wrong with this?

  • Thread starter Thread starter KJ
  • Start date Start date
K

KJ

I cannot seem to get this to work.

Format("mm/dd/yyyy", Date.Today.ToShortDateString)

It comes out as 11/9/2004

I want 11/09/2004

Thanks
 
Try Date.Today.ToString("MM/dd/yyyy") (need caps on the MM)

Also, check out the discussion of the various options under "Standard
DateTime Format Strings".

hth,

Bill
 
ToShortDateString is a culture dependent method, if you want a specific
format then use a format string instead of the method.
 
Back
Top