Date Stamping fields

N

nooB

Hi,

I wish to Date / Time Stamp the majority of transactions
occurring within my database, and have the ability to
manipulate data based on the date or time depending on
records required.

It appears that the most comprehensive way would be to use
full computer clock date & time as list of numbers
123456789 etc rather than any formatting at point of save.

Is this an efficient way of doing it in a database
environment and if so how do I capture that date within
vba and are there any issues with formatting it to just
dates or just times within access later on?

thanks,
nooB
 
M

Marshall Barton

nooB said:
Hi,

I wish to Date / Time Stamp the majority of transactions
occurring within my database, and have the ability to
manipulate data based on the date or time depending on
records required.

It appears that the most comprehensive way would be to use
full computer clock date & time as list of numbers
123456789 etc rather than any formatting at point of save.

Is this an efficient way of doing it in a database
environment and if so how do I capture that date within
vba and are there any issues with formatting it to just
dates or just times within access later on?

To retrieve the system date/time, use the Now() function.
If you don't want the time of day included use the Date()
function. An easy way to time stamp a new record is to just
set the table's timestamp field's DefaultValue property to
Now().

Date/Time values are saved as a Double floating point number
and any Format you use has nothing to with anything beyond
how it is diplayed.
 

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

Top