Converting text date to date date during import

jandr272

Registered User.
Local time
Today, 05:25
Joined
Jun 17, 2014
Messages
11
[SOLVED] Converting text date to date date during import

I am building a database using data imported from Excel workbooks. The dates in the workbooks are formatted as text in the YYYYMMDD format. Is there a way to convert this into date format during the import or after? I am pulling in a lot of different workbooks and trying to avoid having to reformat each individual workbook prior to importing them.

Thanks.
 
Last edited:
You could use a simple UPDATE Query after the import.
Code:
UPDATE tableName SET tableName.NewFieldName = 
[URL="http://www.techonthenet.com/access/functions/date/dateserial.php"]DateSerial[/URL]([URL="http://www.techonthenet.com/access/functions/string/left.php"]Left[/URL](tableName.OldFieldName, 4), [URL="http://www.techonthenet.com/access/functions/string/mid.php"]Mid[/URL](tableName.OldFieldName, 5, 2), [URL="http://www.techonthenet.com/access/functions/string/right.php"]Right[/URL](tableName.OldFieldName, 2));
 
Got it working, thanks a bunch!
 
Last edited:

Users who are viewing this thread

Back
Top Bottom