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!

Help with date/time issues

Status
Not open for further replies.

raineecat

Technical User
Sep 26, 2003
1
US
I'm having a twofold issue with a a database I'm creating in Access 2000. First, I need a field in a table to incorporate both a date and a time. I've tried using the General Date format, but I can't get both pieces to display with no errors. I've tried changing the input mask to 99/99/9999\ 09:99\ >LL;;_, but when I actually enter data in the table I'm getting an error message that the value I entered isn't valid for that field. I'm sure there's something basic I'm missing there, but I can't figure out what it is.

Once that's figured out, I need to be able to run a query to calculate the difference between the dates in two fields. I've seen the DiffDate function suggested, but when i did a search for that in the help feature, nothing came back. Can anyone help me with these issues? Thanks!
-raine
 
First, the Format property doesn't have any influence over how a date/time field is stored. All date/time fields are stored the same, and can hold both a date and a time.

You said you couldn't get it to display without error, but the error you described has to do with the InputMask property, which is used on data entry, not on display. What is the actual problem? Give some real-world examples, please.

The reason you couldn't find DiffDate in the Help file is that the name is actually DateDiff.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top