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

Date Difference

Status
Not open for further replies.

hawg9

IS-IT--Management
Nov 9, 2005
22
US
I have 2 fields that contain dates that are text fields. How can I calculate the difference between the two dates?
 
dates that are text fields
So you don't have dates ...
How are looking the values ?
Have you tried to play with the CDate function ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
The values look like 20051109 and 20051106. I have tried datediff but it did not work
 
And what about something like this ?
DateSerial(Left([text field 1],4), Mid([text field 1],5,2), Right([text field 1],2)) - DateSerial(Left([text field 2],4), Mid([text field 2],5,2), Right([text field 2],2))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top