|
-
Jul 27th, 2008, 06:06 PM
#9
Thread Starter
PowerPoster
Re: Access SQL Query Dates YYMMDDHHMMSS
Anhn:
Thanks for working with me on this.
The query does return the correct records from
noon the day before the date entered
to noon of the date entered.
NOT what I would have Expected!!!
In fact I'm not sure why 0.5 would cause
the Query to back up a day rather than
starting at midnight of the day entered
and then increase that by 1/2 a day to
get to noon of the date entered --
like DateAdd.
Further since there is no BETWEEN clause
I would have expected an Empty Query Recordset since
no record on the date entered has a time
at exactly noon.
================================================
The more I look at this the more confused I get!!!!!!
================================================
I think (unless you disagree -- feedback appreciated)
that changing the DB date string field to a date field
and adjusting all dates to Univeral Time would
greatly simplify any Query and would allow easy use
of the BETWEEN clause.
This would give a common base date which could be adjusted
to any timezone and eliminate the need for a string
date which includes the timezone identifier.
===============================================
One related issued is how Europe (and I assume Australia)
handles Access dates?
To the best of my knowledge, Access stores dates as
a double with the integer portion being the date and
the decimal portion being the time.
When the date is displayed (in an Access date field)
it is presented in a mm/dd/yyyy hh:mm:ss AM/PM
When the Date/Time is extracted it can be displayed
using Format in European time.
So are you using a US date format for any SQL queries
and they displaying as desired or is their a Australian
service pack which allows queries using the European
date.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|