May 8, 2014 at 8:46 am
Hello All,
I have column in my table [Time] which has data type varchar(19). And the format is
02-16-2014-03:52:03.
I want to convert it into datetime format.
Remember this above format has '-' in between date and time. As you can see in format.
I want to move this column from one table to another using datetime datatype.
Please Let me know if anyone has idea about this.
Thanks:-)
Viresh
--------------------------------------------------------------------------
“ The future belongs to those who are virile, to whom it is a pleasure to live, to create, to whet their intelligence on that of the others. ”
— Sir Henri Deterding
May 8, 2014 at 8:49 am
e.g.
select cast(stuff('02-16-2014-03:52:03', 11, 1, ' ') as datetime)
May 8, 2014 at 9:42 am
Thanks for replying me.
That function is working in ssms.
How can we use this in SSIS if I am getting that Time column in FlatFile and I want to convert that into datetime data type.?
Please Let me know.
Thanks:-)
Viresh
--------------------------------------------------------------------------
“ The future belongs to those who are virile, to whom it is a pleasure to live, to create, to whet their intelligence on that of the others. ”
— Sir Henri Deterding
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply