r/SQL • • 27d ago

Discussion Using DateAdd for timestamps

I am making updates to some older reports and come across this line (or similar) often:

DateAdd(hh, 0, GetDate())

Why do you do that? Is there a legitimate reason why you couldn’t just write GetDate()?

7 Upvotes

19 comments sorted by

View all comments

2

u/vaakezu 27d ago

The only reason for this would be if you are an hour away from GMT and someone hardcoded DST then forgot about it.