access 97 date and time entry

  • Thread starter Thread starter John Evans
  • Start date Start date
J

John Evans

Is it possible to enter a date AND time into a form field
and then use datediff to calculate the number of days (and
hours fraction) between this and a similar entry on the
form?
 
Is it possible to enter a date AND time into a form field
and then use datediff to calculate the number of days (and
hours fraction) between this and a similar entry on the
form?

Yes.

To do the DateDiff you'll want to calculate hours or minutes and then
divide by 24 (or 1440) to get fractional days.
 
Yes

| Is it possible to enter a date AND time into a form field
| and then use datediff to calculate the number of days (and
| hours fraction) between this and a similar entry on the
| form?
 
Thanks

The main problem I've got is designing the form so that
access will accept both the date and time (short time -24
hr) in a single field - Access says the data type is wrong
or too large for the FieldSize. I can't see how to change
the FieldSize - General Date seems the most logical but it
isn't working -possibly because it wants a Long Time
format but many approaches over the last few hours have
proven fruitless. I can easily do this with a separate
field for date and time and everyone I've asked knows of
no other solution - very frustrating as I know the
date/time is stored as one number. None of my Access books
seem to acknowledge this as a problem - Thanks for any
info or pointers

John Evans
 
Thanks for all your help

I've got it working now. Using the General Date (as
before) but editing the input mask short date to include
time and using the same mask on the form design.

Regards

John Evans
 
I've got it working now. Using the General Date (as
before) but editing the input mask short date to include
time and using the same mask on the form design.

Best advice is just to get rid of the stuffing InputMask. Does anybody
actually find the things useful?

Tim F
 
Best advice is just to get rid of the stuffing InputMask. Does anybody
actually find the things useful?

Not for dates, certainly!! They just get in the way; Access is very
good at interpreting dates no matter how they're typed in.
 
Back
Top