G
Guest
Forgive me if this is not the right place to post this. I've already had it
booted from the vb.database forum.
------------------------------
I'm thoroughly confused.
The following expression works fine as a table view rowfilter when locale is
set to US.
dateField <= "#" & Now.ToShortDateString & "#"
It fails when you set your locale to German. (Most embarassing for my client
on a recent show and tell to his peers in Europe.))
Error is string is not recognized as date. Presumably because the day and
month are switched in most of the world from what we do in the US. Luckily we
"tested" this after the 12th of the month!!!!
The following works:
Dim noww As String = Now.ToString("MM/dd/yyyy")
dateField <= "#" & noww & "#"
At first I was puzzled because noww is e.g. 09.30.2006. On further reading
the doco I see that the locale date separator is used.
So the question is simple. Have I now stumbled across a formatting of the
test string that will work regardless of the locale's date seperator, or have
I encountered a bug, or what?
More to the point where can i find a good definition of the syntax and
semantics of rowFilter when dates are involved?
Note MS Lurkers - as usual the VS 2005 help is as useless as <substitute
your favorite off color expression for these circumstances>. It only shows an
example and has nothing on globalization. (And this only after you follow
your nose around the barn to "expressions"!)
To use my recurring mantra these days - Yet another reason why VSTS 2005 is
not ready from prime time
--
Regards,
Al Christoph
Senior Consultant
Three Bears Software, LLC
just right software @ just right prices @ 3bears.biz
Microsoft Certified Partner (ISV)
Coming soon: Windows Mail for Vista.
booted from the vb.database forum.
------------------------------
I'm thoroughly confused.
The following expression works fine as a table view rowfilter when locale is
set to US.
dateField <= "#" & Now.ToShortDateString & "#"
It fails when you set your locale to German. (Most embarassing for my client
on a recent show and tell to his peers in Europe.))
Error is string is not recognized as date. Presumably because the day and
month are switched in most of the world from what we do in the US. Luckily we
"tested" this after the 12th of the month!!!!
The following works:
Dim noww As String = Now.ToString("MM/dd/yyyy")
dateField <= "#" & noww & "#"
At first I was puzzled because noww is e.g. 09.30.2006. On further reading
the doco I see that the locale date separator is used.
So the question is simple. Have I now stumbled across a formatting of the
test string that will work regardless of the locale's date seperator, or have
I encountered a bug, or what?
More to the point where can i find a good definition of the syntax and
semantics of rowFilter when dates are involved?
Note MS Lurkers - as usual the VS 2005 help is as useless as <substitute
your favorite off color expression for these circumstances>. It only shows an
example and has nothing on globalization. (And this only after you follow
your nose around the barn to "expressions"!)
To use my recurring mantra these days - Yet another reason why VSTS 2005 is
not ready from prime time
--
Regards,
Al Christoph
Senior Consultant
Three Bears Software, LLC
just right software @ just right prices @ 3bears.biz
Microsoft Certified Partner (ISV)
Coming soon: Windows Mail for Vista.