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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Date and Time

Status
Not open for further replies.

speltrain

Technical User
Apr 29, 2003
17
0
0
US
I'm looking for a way to display the date and time a record was entered without all the formating symbols:) , /,AM/PM) so that it may be used as an index for records entered into my table. I'm basically try to migrate away from the autonumber system of indexing records. Does anyone know how I can do this in a simple without a lot of code, I'm kind of new in writting the code.

Thank you in advance
 
Hello:
Well if you want Date and Time in the same field and not two separate fields. Then use Now()
If it is on your form. Create a textbox. On the On Current Event of the form place in:
Me.txtboxName = Now()
Bound that field back to the table.
If it is in the table itself
on the format where the field is in design view
type in =Now()
Cool
Hope this helps
 
I wasn't very clear on what I wanted. I would like to print the numbers of the date and time only. This is without backslashes, colons, the AM/PM, and dashes that would appear in just calling Date(), Time(), or Now().

Is there a way to just get the numerical values without all the formating?
 
How's 'bout

format (now(), "yyyymmddhhmmss")

Returned 20030613155900

Plug the name of your date field
on top of now()

HTH,
Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top