how to create a date with dynamic year, month, and day?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How to create a date with some interger values as month, day, and year, which
are returned from inside the current query?
eg. select DateDiff("h", #5/1/2003#, log_dt) from localData
where log_dt is a date field in table localData, and #5/1/2003# should be
built dynamically.

thanks,

wei
 
Hi,

wz schreibselte:
How to create a date with some interger values as month, day, and
year, which are returned from inside the current query?
eg. select DateDiff("h", #5/1/2003#, log_dt) from localData
where log_dt is a date field in table localData, and #5/1/2003#
should be built dynamically.

DateSerial <F1> should help.

Joerg
 
You can use the DateSerial() function or you can construct the hash
(#)-delimited String like your example (and Access will convert it to a Date
value for you).

Check Access VB Help on the DateSerial() function.
 
Back
Top