SQL Date function question

Niladri.Biswas
Posted by Niladri.Biswas under Sql Server category on | Points: 40 | Views : 1179
I'm using SQL Server 2005 and I have a DateTime column.

How can I multiply the hour and minute of a DateTime column by 1.2 and return the new value?

SELECT 
DATEADD(
s,
DATEDIFF(s,DATEADD(dd, DATEDIFF(dd, 0, GETDATE()), 0),GETDATE())*1.2,
DATEADD(dd, DATEDIFF(dd, 0, GETDATE()), 0)
)

Comments or Responses

Login to post response