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

ODBC Table has number values for dates - How to Convert 1

Status
Not open for further replies.

JwithaL

Technical User
Jul 14, 2004
44
I'm linking to my ACCPAC database so I can make reports out of ACCESS. Problems are starting to pop up when I need to base things off of date differences. Let's say today's date and when something is stated in the system. The format is yyyymmdd. (Ex:

Is there a way to convert it to a date or can I do something to the current date to allow me to view the difference between the two. I am using the date() function for more info.

Any help would be much appreciated.

Justin
 
How about:
[tt]dteIn = 20051107
dteOut = DateSerial(Left(dteIn, 4), Mid(dteIn, 5, 2), Right(dteIn, 2))
intDays = Date - dteOut[/tt]
 
Works like a charm... thank you very much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top