Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Is there any way I can get the date out from a Timestamp field?
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts
Posted - 2005-03-18 : 19:54:59
If it is a true Timstamp column, meaning that the datatype is TIMESTAMP or ROWVERSION, it does not contain a date.If you mean a column with a datatype of DATETIME, you can convert from a datetime to just a date with:
select Date = dateadd(dd,datediff(dd,0,MY_DATE),0)
quote:Originally posted by jung1975 Is there any way I can get the date out from a Timestamp field?