September 23, 2015 at 8:22 am
Hi All
i have date format like this Sep 14 2015 10:14PM any idea to convert into datetime using derived column
September 23, 2015 at 8:29 am
A simple CAST seems to work.
(DT_DATE)"Sep 14 2015 10:14PM"
September 23, 2015 at 11:16 pm
that ok fine .. thank you
September 23, 2015 at 11:34 pm
any idea how to convert this format "Sep 21 2015 12:00:00:000AM"
September 24, 2015 at 6:39 am
Do you seriously have the dates stored as strings like that? Or that's the display used? Dates should be treated as dates. SSIS can identify a date/time value in the source and translate it automatically to the date/time value needed in the destination. No need to handle them as strings.
If the string is really in there, you can use SUBSTRING
(DT_DBTIMESTAMP)(SUBSTRING( "Sep 21 2015 12:00:00:000AM", 1, 20 ) + SUBSTRING( "Sep 21 2015 12:00:00:000AM", 25, 2 ))
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply