Most of our dates are stored as: 2015-01-01 00:00:00.000 and I want to truncate the time to just product yyyy-mm-dd
Comments
2 comments
-
There is an old but still excellent article from Robyn Page, on various ways to manipulate data/time information - https://www.red-gate.com/simple-talk/sql/learn-sql-server/robyn-pages-sql-server-datetime-workbench/
-
Try this:
SELECT cast(getDate() As Date)
If this looks good for you, replace ''getDate()' with the name of column that holds the datetime data.
JR
Add comment
Please sign in to leave a comment.