Discussion:
Format Bug When Date is > '1/1/2007'?
(too old to reply)
s***@gmail.com
2007-01-04 02:28:56 UTC
Permalink
Has anyone encountered the Format( aString ) function behaving
differently asof 1/1/2007? I'm seeing this:

Format('070102-1') results in '1/01/4566'

and

Format('061227-1') results in '061227-1'

(as you can tell I don't usually delve into VB). This is stuffing up
one of the feeds we've got that have been working since 2003.

Anyone got any information on this? (The solution is easy, remove the
Format() function, but I'm curious as to what the cause is).
Tony Proctor
2007-01-04 10:24:16 UTC
Permalink
Can you show us some real VB Steve. The Format() call you describe is not
proper VB and so we can't see what you're trying to do

if Format() is called with a plain text argument, and no parameters, then
I'm not sure what you are expecting. I believe VB is trying to guess whether
the text is a valid date or just some other text, e.g.

Format("2006-3-2")

is interpreting the string as a yyyy-mm-dd type of date, whereas with

Format("2006-3-92")

it decides it's not a date at all.

What would you expect your call to generate?

Tony Proctor
Post by s***@gmail.com
Has anyone encountered the Format( aString ) function behaving
Format('070102-1') results in '1/01/4566'
and
Format('061227-1') results in '061227-1'
(as you can tell I don't usually delve into VB). This is stuffing up
one of the feeds we've got that have been working since 2003.
Anyone got any information on this? (The solution is easy, remove the
Format() function, but I'm curious as to what the cause is).
Loading...