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

Hi, FOLKS, NEED A BIG HELP on calculate DAYS????

Status
Not open for further replies.

jane30

Programmer
Nov 14, 2000
92
US
Hi, I'm Access97 user. In the data I imported, there were 2 text fields Indate and Outdate. The value in both fields are not valid time value. E.g., if 08/06/2000, it shows "20000806". Sometimes I need to calculate the days between Indate and Outdate. How to do this? I tried to convert them to date fields, but it didn't work since both fields contained invalid time value.

Any suggestions are very welcome. thank a lot. ;-)
 
Can you run an update query on those fields to get slashes in the appropriate spots using the right and/or left functions? Once you do that, you can convert the data--
 
Try this, ...

create and expression...call MyInDate

in a field name area of your query, type

MyInDate:=format(mid([tablename]![indate],5,2)&"/"&right([tablename]![indate],2)&"/"&left([tablename]![indate],4),"mm/dd/yyyy")

do the same for outdate

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top