Link to home
Start Free TrialLog in
Avatar of gethryn
gethrynFlag for Australia

asked on

Importing Dates from Strings in "DD-MMM-YYYY HH.NN.SS.ssss" Format

Hello,

I have a data file that I receive daily from another source.  I cannot change the format of the datafile.  I need to import the contents of the file into my SQL database (MS SQL Server 2000), and then perform various analyses.  Two of the fields are datetime fields in the format: "DD-MMM-YYYY HH.NN.SS.ssss".  I need the fields to be true datetime fields in my database.

A simple CAST or CONVERT gives me an error, saying that the string could not be converted to a date, presumably because of the month being in MMM format?

Is there a way to manipulate these date strings so that they can be properly imported?
SOLUTION
Avatar of wizengamot
wizengamot

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Ted Bouskill
Ted Bouskill
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial