Home Forums SQL Server 2008 T-SQL (SS2K8) lookup table for minutes of a day RE: lookup table for minutes of a day
ParulPrabu
SSCrazy
Points: 2271
More actions
October 8, 2013 at 12:54 am
#1656620
Hi,
You can try with help of replace and convert functions
REPLACE(CONVERT(CHAR(16),DATEADD( MINUTE, DATEDIFF( MINUTE, 0, DATEADD( YEAR, -2, GETDATE())), 0), 126), 'T', ' ')