Date and Time

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

Guest

I am using a Append Query to add data to a table. I want the Field in the
query to add the current date and a time value of 08:00:00 AM. Basically the
query is going to be used on Holiday's to automatically punch in an employee.
I can add a date but cant seem to get it to write the date and specific time.
Thanks for your help.
 
Don't think so.

Date() + #08:00:00# would make more sense, or Date() + TimeSerial(8, 0, 0)
 
While it may work, it's relying on data type coercion. A date is a numeric
value, and you're concatenating a string to it. It's far safer to add the
number representing the date to the number representing the time.
 
Thanks


Douglas J. Steele said:
While it may work, it's relying on data type coercion. A date is a numeric
value, and you're concatenating a string to it. It's far safer to add the
number representing the date to the number representing the time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top