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

How to structure date and time field(s)

Status
Not open for further replies.

daneharnett

Programmer
May 26, 2003
39
AU
Hi I've just got small problem, im not sure if i should have 1 field called for example DateTimeOfContact or 2 fields for each part eg 1. DateOfContact, TimeOfContact...

What do ya think/???
 
Leave it DateTime of Contact - this way, you can use the VB/VBA function of Now(), which will insert the current date and time into the field (with Access97 anyways, not sure about more current versions).

HTH

Greg


Boss quote from an office meeting: We're going to continue to have these meetings until we figure out why no work is getting done ...
 
Jet, the database engine behind Access, always stores date/time data with both parts. Anything you store with just a date will have a time of midnight and anything you store as just a time will have some date associated with it, though I don't remember exactly what it is. If you're going to use a date/time field, you should keep that in mind. And if you're going to store both parts, you should definitely use a date/time field.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Professional Development for Clients Large and Small

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top