Short Date Format

  • Thread starter Thread starter Gerry Cafolla
  • Start date Start date
G

Gerry Cafolla

Hi,

I am trying to get a date into the format (dd mmm yyyy)

e.g. 16 Sep 2003

Here is my code:

Dim dt as DateTime
Dim sDate as string

sDate = dt.ToLongDateString

Which yields "16 September 2003"

Is there an equivalent method/property that quickly allows
the dd mmm yyyy format ?

I have tried

dt.ToString("dd mmm yyyy")

but I get "16 00 2003"

Any help appreciated.

Gerry
 
Gerry Cafolla said:
Hi,

I am trying to get a date into the format (dd mmm yyyy)

e.g. 16 Sep 2003

Here is my code:

Dim dt as DateTime
Dim sDate as string

sDate = dt.ToLongDateString

Which yields "16 September 2003"

Is there an equivalent method/property that quickly allows
the dd mmm yyyy format ?

I have tried

dt.ToString("dd mmm yyyy")

but I get "16 00 2003"

Any help appreciated.

Gerry

Watch the capitalization: "dd MMM yyyy"
 
Back
Top