Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date and Time Inserted into Record

Status
Not open for further replies.

longbillduck

Technical User
Sep 26, 2001
29
US
I know I can use =Date() to add the date to a new record

But is there a way to add the date and hour & minutes?

Thanks

Art
 
Art,

The now() function returns the date as the integer portion and the time() as the fraction portion - thus int(now()) is the date and fract(now()) the time you are after.

format() is the way to see all this using date. Check out your F1 to see the options.


Rollie
 
Hey longbillduck,

You can use Date() if you want the date to update every day or you can use Now() which will "stamp" the record with the current date and time and will not update everyday.

For the hour and minutes to show just choose the correct Date/Time formatting:

General Date = mm/dd/yyyy hh:mm:ss

mm = double digit month
dd = double digit day
yyyy = four-digit year

hh = double digit hour
mm = double digit minute(s)
ss = double digit seconds

Or you can customize it the same way like:

mm/dd/yyyy hh:mm

just make sure you type it just the way you see it in the 'Format' section of the properties.

TheStriker
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top