Return date only from datetime

/ Published in: SQL
Save to your folder(s)

Copy this code and paste it in your HTML
  1. SELECT CAST(FLOOR(CAST(Getdate() AS FLOAT))AS Datetime)
  3. SELECT DateAdd(DAY, 0, DateDiff(DAY, 0, Getdate()))

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.