Tuesday 14 November 2017

Get only Time from DateTime column using SQL query using SQL Server

Get only Time from DateTime column using SQL query using SQL Server 2005 and 2008


Description:

In this example we explain that how to get only Time from Date Time column in SQL Server. Or SQL Query to get only Time from Date Time column. Or how to get only Time from select query of SQL Server from Date Time column.

Below is the SQL Query to get only Time from date time column of the table in Sql Server.
Query:

SELECT (getdate()),substring(CONVERT(VARCHAR, GETDATE(), 108),0,6) AS Time



This entry was posted in :

0 comments:

Post a Comment