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!

Best way to get a string date as a date object

Status
Not open for further replies.

mantleg

Programmer
Joined
Aug 8, 2003
Messages
4
Location
GB
I have a date stored as a string in the format mm/dd/yyyy.
What is the easiest way to get this date converted to a datetime object so i can include it in the datediff function.

also what is the method i should use to return a mm/dd/yyyy string back from the datatime object
 
Code:
cdate(stringvar)
or 
cdate("mm/dd/yyyy")

and

Code:
datetimevar.tostring

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
What a wonderfull world - Louis armstrong
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top