Time variables

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

Guest

Hello,

Typically when working with date variable I declare them 'as Date'. What
should I declare time variable? Are they too considered 'as Date'?

Daniel
 
Yes, they are.

Be aware, though, that Access doesn't really support time variables. The
Date data type is intended to be used for a timestamp: an exact date and
time representation (under the covers, the Date data type is an 8 byte
floating point number, where the integer portion represents the date as the
number of days relative to 30 Dec, 1899, and the decimal portion represents
the time as a fraction of a day). If you assign simply a time to a Date
variable (as in dtmVariable = #08:00:00#), Access will treat that as 8 AM on
30 Dec, 1899.
 
Hi Danial,

Both Date and Time are contained in a Date (DateTime) variable. Yes,
declare your time variable as a Date variable.
 

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