Reputation: 1463
I am comparing a "date" with current date(GETDATE()) using DATEDIFF().
The problem i am facing is that the "date" is in dd/MM/yyyy format and the date i am getting using GETDATE() includes the timestamp also.
Please guide me how to remove the timestamp from GETDATE(),and also want to compare these two dates.
Thanks in advance.
Upvotes: 0
Views: 17680
Reputation: 27214
Please guide me how to remove the timestamp from GETDATE(),
The documentation for GETDATE
has this contribution at the bottom of the page:
CAST(DATEDIFF(Day, 0, GETDATE()) AS DATETIME)
Upvotes: 4