gorilla1
03-27-2003, 04:52 PM
I am taking the contents of a file and uploading into an access database. The file contians times in mm.dd.yy format. Is there a way I can convert these into a timestamp in the data base so that I can order the records by time/
G
whammy
03-28-2003, 12:35 AM
Sure, how are you uploading them into the database?
I might convert the date to YYYYMMDD format when you upload it, that seems to work pretty well for date sorting purposes, i.e.:
MyDate = Year(Now()) & Right("00" & Month(Now()),2) & Right("00" & Day(Now()),2)
If you replace your "." with "/" in the dates, then it should be an "Americanized" date format, which I believe is standard for IIS, etc.
Then just use CDate() on the variable (if it doesn't work already ;)), and then you should be able to replace all the "Now()"'s with your variable name...
That's just an example, but should point you in the right direction. Please post with any further questions! :)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.