469,898 Members | 1,707 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

Format function bug or user error

Hello,
I'm encountering a bug, or user error, with the Format function and I'm
wondering if someone can either straighten me out or confirm the bug.
I'm passing in a Date to the Format function and a style:

Dim dte As Date = Date.Parse("8/19/2005 1:06:00 PM")
Dim s As String = "mm/dd/yyyy"

Console.WriteLine(Format(dte, s))

The Format function is returning:
06/19/2005

What is up with this?

Thanks in advance for any help
Steve
Nov 21 '05 #1
4 1026
mm = minutes, MM=month
"Steve Long" <St**********@NoSpam.com> wrote in message
news:Ox**************@TK2MSFTNGP10.phx.gbl...
Hello,
I'm encountering a bug, or user error, with the Format function and I'm
wondering if someone can either straighten me out or confirm the bug.
I'm passing in a Date to the Format function and a style:

Dim dte As Date = Date.Parse("8/19/2005 1:06:00 PM")
Dim s As String = "mm/dd/yyyy"

Console.WriteLine(Format(dte, s))

The Format function is returning:
06/19/2005

What is up with this?

Thanks in advance for any help
Steve

Nov 21 '05 #2
"Steve Long" <St**********@NoSpam.com> schrieb
Hello,
I'm encountering a bug, or user error, with the Format function and
I'm wondering if someone can either straighten me out or confirm the
bug. I'm passing in a Date to the Format function and a style:

Dim dte As Date = Date.Parse("8/19/2005 1:06:00 PM")
Dim s As String = "mm/dd/yyyy"

Console.WriteLine(Format(dte, s))

The Format function is returning:
06/19/2005

What is up with this?


This is mm/dd/yyyy = minutes/day/year.

Use "MM" for month.
Armin
Nov 21 '05 #3
Silly me. Thanks guys.

Steve

"Steve Long" <St**********@NoSpam.com> wrote in message
news:Ox**************@TK2MSFTNGP10.phx.gbl...
Hello,
I'm encountering a bug, or user error, with the Format function and I'm
wondering if someone can either straighten me out or confirm the bug.
I'm passing in a Date to the Format function and a style:

Dim dte As Date = Date.Parse("8/19/2005 1:06:00 PM")
Dim s As String = "mm/dd/yyyy"

Console.WriteLine(Format(dte, s))

The Format function is returning:
06/19/2005

What is up with this?

Thanks in advance for any help
Steve

Nov 21 '05 #4
Steve,

Will you be so kind not to write "Bug" before you are absolute sure of it.

If everybody start from simple programs errors to tell that it can be a bug,
than Microsoft people will for sure ignore this newsgroups to look for bugs
what cannot be our goal.

Thanks in advance,

Cor
Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Andrew | last post: by
6 posts views Thread by WindAndWaves | last post: by
1 post views Thread by mahnovetsky | last post: by
2 posts views Thread by DD | last post: by
1 post views Thread by bidllc | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.