Import date format "MM/DD/YYYY hh:mm:ss" from CSV (1 Viewer)

Ligaya

Registered User.
Local time
Today, 23:10
Joined
Apr 21, 2007
Messages
49
Hello,

I tried to import a csv file that I will be receiving on a regular basis to add to a table in ACCESS.

One field has date/time that has the format "5/26/2008 00:00:00" in the .csv file.

Unfortunately, when I import the CSV file, this field that has the date/time format does not properly import and I get type conversion errors.

Can someone please tell me why this is and what am I not doing right?

Thank you in advance.

Regards,
Ligaya





 

namliam

The Mailman - AWF VIP
Local time
Today, 15:10
Joined
Aug 11, 2003
Messages
11,695
In your import specification you can enter the date format in one of the fields...
MDY is the one you want it is probably set to something different.

the time following the date shouldnt be a problem...
 

Ligaya

Registered User.
Local time
Today, 23:10
Joined
Apr 21, 2007
Messages
49
Impot date format "MM/DD/YY hh:mm:ss" from CSV

To The Mailman,

Hello there, sir.

I have already tried previously what you have just suggested without much luck. What I neglected to mentions is that the date time(for a start time) has AM or PM after the time, for example: 5/26/2008 7:30:15 AM.

When I tried to import to a table, the Start Column is blank and I got the type conversion errors.

I have been working on this import task for a couple of days now without much luck.

Regards,
Ligaya
 

namliam

The Mailman - AWF VIP
Local time
Today, 15:10
Joined
Aug 11, 2003
Messages
11,695
Odd, I have never bumped into this problem... But access doesnt seem fond of the AM part...

It is getting stranger.. You can convert it using CDate function.
Is it a solution for you to import the date/time field as a Text temporaraly and convert it later using CDate?
 

Ligaya

Registered User.
Local time
Today, 23:10
Joined
Apr 21, 2007
Messages
49
Import date format "MM/DD/YYYY hh:mm:ss from CSV

Hello!

Changing the format of the date/time to text worked. Thank you.

Regards,
Ligaya
 

Michael Leidel

New member
Local time
Today, 08:10
Joined
May 30, 2012
Messages
1
To import a DateTime field from a CSV file you can use the following formatting:
"m-d-yy"
"mm-dd-yy"
"mm-dd-yyyy"
Enclose the date in quotes like a string. If there is no date value for a record don't put anything between the commas,,.
 

mawish42

New member
Local time
Today, 06:10
Joined
Nov 6, 2012
Messages
1
Hello,

I tried to import a csv file that I will be receiving on a regular basis to add to a table in ACCESS.

One field has date/time that has the format "5/26/2008 00:00:00" in the .csv file.

Unfortunately, when I import the CSV file, this field that has the date/time format does not properly import and I get type conversion errors.

Can someone please tell me why this is and what am I not doing right?

Thank you in advance.

Regards,
Ligaya









I am trying upload file in Access table from drive R:\ and the Excel file has the date format "REPRINT_REQUEST_UPLOAD_10-31-2012 12:30PM" it change every day
 

Users who are viewing this thread

Top Bottom