|
Question : Convert Text field type to Date/Time
|
|
In a text file I have a field that stores a date & time. The data is extracted from a database which stores my date/time as a text field. So it is a text type in my text file.
A field value looks like this 4252006 9:44:00 AM
I need it to be in a date/time format in Access. I tried playing with the Import specs but it isn't working for me (I get an import error and the field comes up empty).
I know you experts know how to solve this! :)
I'm a novice so please give me the solution in Easy terms. THANKS!
bgb
|
|
Answer : Convert Text field type to Date/Time
|
|
An import spec isn't going to be flexible enough to help you to convert it to a date, on the fly.
Problem: Turn 4252006 9:44:00 AM into 4/25/2006 9:44:00 AM, but you also may have original data like 12252007 9:44:00 AM.
I'd import the data directly into a text field in access and then write a small parser in VBA that will convert the data.
Can the original database not export the data in a form that looks like a "real" date?
|
|
|