viernes, 18 de mayo de 2012

Dates calculation in SQL

SELECT GETDATE() AS NOW, GETDATE()-(1) AS YESTERDAY, GETDATE()-(0.04166666) AS PREVIOUS_HOUR, GETDATE()-(0.0006944444) AS PREVIOUS_MINUTE, GETDATE()-(0.000011574) AS PREVIOUS_SECOND