Date and Time Format Calculation

cbetts75

Registered User.
Local time
Today, 16:42
Joined
May 26, 2006
Messages
15
Hi,

I need to calculate the number of days between two days however the format on which i have my date includes the time in the same field -

2007-02-20 07:15:30.474

When I calculate one date minus an other the result is #error
I require the result to be in a count format e.g 2.3 days (like in excel)

Is there anyway to get around this without splitting the date and time?

Please help!:)
 
the #error is nothing to do with format.
Post the code you use for the calculation
 
Expr1: [Qry_AllRepairs_TAT_KN_Front]![Received at rep]-[Qry_AllRepairs_TAT_KN_Front]![Recieved at KN]

Received at Rep Recieved at KN
2006-11-21 00:00:00.0 2006-11-21 16:44:06.602

that calc is used to subtract one from another
 
Received at Rep Recieved at KN
2006-11-21 00:00:00.0 2006-11-21 16:44:06.602
Are they text fields? Date/time fields in Access do not accept decimal points in seconds.

If they are text fields, you can change them into date/time fields in table design.

For text fields, you have to use functions to get rid of the decimal points and then use the CDate() function to convert the proper text strings to dates before you can use them in calculations.
.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom