Reference:
http://blog.sqlauthority.com/2007/06/21/sql-server-retrieve-current-date-time-in-sql-server-current_timestamp-getdate-fn-now/
http://www.sqlusa.com/bestpractices/datetimeconversion/
Get today function:
GETDATE()
Convert string to Date format:
CONVERT(datetime, [Field])
SQL command:
SELECT *
FROM [Table]
WHERE (GETDATE() - CONVERT(datetime, [Field])) > 15
沒有留言:
張貼留言