January 13, 2012 at 5:16 pm
I am creating a tmp table into a stored procedure in which I have two columns using convert function.
td= CONVERT(CHAR(8),DATEADD(SECOND,PackageDuration,'0:00:00'),108), ' ',
-- this column is converting seconds(int) in HH:MM:SS
tb= CONVERT(CHAR(24),DATEOFRUN,120), ''
-- this column is displaying date and time of the package run
Now the problem I am facing is I am getting these two columns in one resultset only.
i.e. 00:00:00 00 FEB 0000 00:22:36
Please anybody can help...!! 🙁 🙁
January 13, 2012 at 5:48 pm
January 15, 2012 at 10:31 pm
Thanks bteraberry,
But i got the solution in diff. way. I just wanted time from the second column and I modified it and now it is giving me the result i wanted.
I used "CONVERT(CHAR(8), DATEOFRUN, 108)" to get only time from datetime column.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply