Date formats not displaying from the database properly

Date formats not displaying from the database properly

am 01.06.2005 13:11:03 von stevenscaife

Ok I'm having a problem thats proper doing my head in, the dates aren't
displaying properly

I am at work so don't have the code but can describe how it works, it is
calssic ASP with a Access 2000 backend

I have query that selects all the dates that are geater than date()

I have session.LCID = 2057 at the top of the page which i believe is the uk
locale

this is on the pages that insert dates into the database and the page that
lists all gigs.

I think the problem is that access is storing them american my insert
statement looks like

strSQL = "INSERT INTO Gigs VALUES ('" & venue & "', #" & vDate & "#, '" &
location & "')"

Does access automatically store in the us time format, will I have to format
the date using long date on the insert to overcome this or am I missing
something totally

TIA

Re: Date formats not displaying from the database properly

am 01.06.2005 13:37:30 von reb01501

steven scaife wrote:

> I have session.LCID = 2057 at the top of the page which i believe is
> the uk locale
>
> this is on the pages that insert dates into the database and the page
> that lists all gigs.
>
> I think the problem is that access is storing them american my insert
> statement looks like

What are the symptoms of the problem?

>
> strSQL = "INSERT INTO Gigs VALUES ('" & venue & "', #" & vDate & "#,
> '" & location & "')"
>

Nothing to do with your problem, but you should use parameters [1]

> Does access automatically store in the us time format,

With Jet Date/Time fields, datetimes are stored as Double numeric values
(the whole number portion contains the number of days from the "seed" date,
and the decimal portion contains the time of day - .5 = noon). There is no
formatting information stored. Formatting is applied by the client
application retrieving the Double values from the database.

More information:

http://www.aspfaq.com/show.asp?id=2313 vbscript
http://www.aspfaq.com/show.asp?id=2040 help with dates
http://www.aspfaq.com/show.asp?id=2260 dd/mm/yyy confusion

HTH,
Bob Barrows

[1]
http://www.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&sel m=e6lLVvOcDHA.1204%40TK2MSFTNGP12.phx.gbl

or

http://groups-beta.google.com/group/microsoft.public.inetser ver.asp.db/msg/72e36562fee7804e

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"