title: Splitting Date into 2 Columns (Date + Time) in SQL
body: <p>I'm trying to convert the Date key in my table which is numeric into date time key.  My current query is: </p>
  
  <pre><code>  SELECT 
    DATEADD(HOUR,-4,CONVERT(DATETIME,LEFT([Date],8)+' '+
    SUBSTRING([Date],10,2)+':'+
    SUBSTRING([Date],12,2)+':'+
    SUBSTRING([Date],14,2)+'.'+
    SUBSTRING([Date],15,3))) [Date],
    [Object] AS [Dataset],
    SUBSTRING(Parms,1,6) AS [Media]
    FROM (Select CONVERT(VARCHAR(18),[Date]) [Date], 
    [Object],
    MsgId,
    Parms
    FROM JnlDataSection) A
    Where MsgID = '325' AND
    SUBSTRING(Parms,1,6) = 'V40449' 
    Order By Date DESC;
  </code></pre>
  
  <p>The Date Column shows this:
  2013-06-22 13:36:44.403</p>
  
  <p>I want to split this into two columns:
  Date:
  2013-06-22</p>
  
  <p>Time (Remove Microseconds):
  13:36:44</p>
  
  <p>Can anyone modify my existing query to display the required output? That would be greatly appreciated.  Please Note: I'm using SQL Server Management Studio 2008.</p>