var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: saperate the columns
I have a time stamp in my table and I want to convert into two separate columns Date and time.
I have something like this 06/01/2009 00:00:00 and I want to make it like
Column 1 (Date) --> 06/01/2009
column2( Time) --> 00:00:00
can anybody help??
SELECT CONVERT(VARCHAR(10),timestamp,101) AS "Date"
, CONVERT(VARCHAR(8),timestamp,108) AS "Time"
Thank you very much for your help but I was wondering if there is any way that I can ALTER my table permanently in a way that instead of one column stamp,I can have two permanent columns Date and Time.
I will really appreciate your guidance.
separate DATE and TIME columns are possible in SQL Server 2008
in earlier versions your only choice is DATETIME
I have SQL Server 2008. How can do it?
use ALTER TABLE to add the two new columns, then UPDATE the table to set the DATE and TIME column values from the original DATETIME column, then ALTER TABLE again to drop the DATETIME column
Originally Posted by
may i ask why you want separate columns?
Thank you very much Rudy. i tried that and it is working very fine. I am really thankful to you.