A foolproof way to use dates in queries ?

  • Thread starter Thread starter Alex T
  • Start date Start date
A

Alex T

Folks

I'm pretty sure this has been discussed here quite a few times, but
anyway...

Is there an absolute foolproof method to use dates in queries in such
a way that the query will work regardless of the international date
system of the machine ?

In other words, assuming I want to hard code a constant in my query,
and I want this query to work on ANY machine with ANY international
version of Access... what should I do ?

I thought that enclosing the date constant between # # would force US
date system, but it does not seem so.

Any advice welcome

--AlexT
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Using the # delimiter doesn't FORCE the date into US date format - it
"says" that the date between the delimiters IS in US date format.
IOW, this:

#3/12/04# is interpreted as March 12, 2004

But - if it was REALLY December 3, 2004 it would still be interpreted
as March 12, 2004 because the # delimiters SAY the date is a US date.
So, if you wanted December 3, 2004 the date would look like this:

#12/3/04#


HTH,

MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQEZSqIechKqOuFEgEQJoKQCfZ1ICDW35gnsXOmTex6wZhHw2bkEAmQHU
j6rR/6voXo4qrJGYd1vQzzKO
=dR1+
-----END PGP SIGNATURE-----


Alex T wrote:
 
Use the form #May 05 2004#

That's pretty clever, and makes reviewing obvious !

;-)

Thanks

Alex
 
Back
Top