CSV String to Date

More
5 years 2 days ago #18668 by tdemeza@natrisk.com
I am sorry to keep asking questions, but I read the Wiki, test, read again, test, and I am befuddled. I am trying to simply Convert a date from a CSV file to a date to insert into my SQL table.

The date in the csv is : 9/27/2018 12:00:00 AM

So I chose the Date Format tool and chose the format : MM/DD/YYYY HH:NN:SS TT

I get a Null if there is an error, and I cannot get anything except a Null. What could I be doing wrong?

FYI - In my SQL Table the destination field is a SmallDateTime. Not sure that matters, because I cannot get the string into a date format regardless.

Please Log in or Create an account to join the conversation.

More
5 years 2 days ago #18669 by admin
Replied by admin on topic CSV String to Date
MM means that month is always two characters long
09/23/2000 and not 9/27/2000
In your case month is one character long, therefore, the correct format is:

M/D/YYYY HH:NN:SS TT

Mike
ETL Architect
The following user(s) said Thank You: tdemeza@natrisk.com

Please Log in or Create an account to join the conversation.