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

difference in two dates gives cata mismatch

Status
Not open for further replies.

scottian

Programmer
Jul 3, 2003
955
GB
im trying to find the difference between two dates. when i use "a= date1 - date2
i get " data type mismatch error "

i thought this was a simple equation, but dont know what to do now

"My God! It's full of stars...
 
data type mismatch error
How are Dim'ed a, date1 and date2 ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
sorry, that was just a rough example.

this is what im actually using.

Me![Text6] = Me![DateandTimeNow] - Me![endOFdays]

the boxes on the form are formatted as general date.
and the dates look fine (date and time). it just wont do the math

"My God! It's full of stars...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top