By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,276 Members | 1,247 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,276 IT Pros & Developers. It's quick & easy.

Short Date Format

P: n/a
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

Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi,

Me.Text = Now.ToString("dd MMMM yyyy")

Ken

---------------------

"Gerry Cafolla" <ge***@nospam.com> wrote in message
news:0c****************************@phx.gbl...
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

Nov 20 '05 #2

P: n/a
sDate = DateTime.Now.ToShortDateString

"Gerry Cafolla" <ge***@nospam.com> wrote in message
news:0c****************************@phx.gbl...
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

Nov 20 '05 #3

P: n/a
"Gerry Cafolla" <ge***@nospam.com> schrieb
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"
--
Armin

Nov 20 '05 #4

P: n/a
Doh ! Thanks
dt.ToString("dd mmm yyyy")

but I get "16 00 2003"

Any help appreciated.

Gerry


Watch the capitalization: "dd MMM yyyy"
--
Armin

.

Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.