Converting from a String to a Date Format

S

Sean Varano

I currently have a large table (1.4+ records) with date
information that is currently stored as a string. The
field does not have any date part seperators (e.g., / or -
). For example, October 1, 2001 is stored as 09012001.
I have figured out how to convert where there are date
part seperators (e.g., DateValue function) but I can't
seem to figure it how when there are no seperators. Any
idea if this can be done easily. Currently I break out
all of the component parts of the date, convert them to
numerical, and then make them into a date field with the
DateSerial function. This takes FOREVER with such a
large file. Any other way to accomplish this??? THanks
in advance.

Sean Varano
 
D

Douglas J. Steele

DateSerial(Right([TextDate], 4), Left([TextDate], 2), Mid([TextDate], 3, 2))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top