[thelist] ADO Date Functionality

Mike Ashton mashton at 4all.com
Mon, 03 Jan 2000 13:24:28 -0500


Anthony,

I'm not sure you got an answer to this one?
Typically a DB defaults to ANSI format 'YYYY-MM-DD' but can be
overridden in the DB defaults. I'm not familiar with ASP or VB but it
sounds like they have their own default format, which could be
controlled by your Regional settings (you never know with M$)

One way of getting the format you want is to construct your query like
this:

select to_char(DateField, 'YYYY-MM-DD HH24:MI:SS') as DateField1
      From TableName (Query Analyzer)

Hope this helps.

Mike

====================================================================
PGP Fingerprint:                 mashton@4all.com
B449 07E4 9BF7 914A AFBA 1531 B576 9116 660A 1C40
====================================================================