More Access date trouble
  Home FAQ Contact Sign in
microsoft.public.inetserver.asp.db only
 
Advanced search
POPULAR GROUPS

more...

microsoft ... asp.db Profile…
 Up
More Access date trouble         


Author: Giles
Date: Jul 10, 2008 16:05

I use a german rented virtual server. MSAccess dates (entered by an SQL
INSERT) appear in the database table (when downloaded and opened as Access
on my local UK machine) appear as mm/dd/yy. But if I then update it locally
(e.g. via localhost) those dates appear as dd/mm/yy. The raw date in both
cases is formatted as yyyy-mm-dd hh:mm:ss before being inserted.
<%%SetLocale(1033)%%> is used on both the server and localhost page.
Is there a way to make the server-based Access use a UK date/time format, or
does Access always use the Regional Settings of whichever machine it is on
at the time? (I can't access the windows settings on the server)
Is there any sense in using a (double) number like 20082207103000 for date
time?
Thanks, Giles
1 Comment
L         


Author: Old Pedant
Date: Jul 10, 2008 16:29

Access *ONLY* understands USA dates. MM/DD/YYYY

Sorry, but that's a fact of life.

Okay, it's also not quite true.

If you give it a date such as
23/6/2008
then it says "Oh, 23 is too large to be a month number, so it must be a day
numbers, so I'll change and assume DD/MM/YYYY format."

But if you give it
7/6/2008
it will *ALWAYS* assume you mean July 6, 2008. USA form.

Unlike SQL Server, there is no way to tell Access what format you are using
*AND* the Locale you are using has no impact on the Access SQL query. I
know. Ugly.

HOWEVER...

However, there *IS* a universal solution: Give Access the date in
YYYY/MM/DD format!! Just as it changes to DD/MM/YYYY when the first number
is greater than 12, it *also* changes to YYYY/MM/DD format when the first
number is greater then 31!!!

In VBScript/ASP this is easy:
Show full article (1.42Kb)
no comments

RELATED THREADS
SubjectArticles qty Group
Re: Access XP can create Access 2000 MDE ?microsoft.public.access ·
How do I 'back migrate' an Access database from Access 2007 to 200microsoft.public.access ·