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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 TImestamp

Author  Topic 

jung1975
Aged Yak Warrior

503 Posts

Posted - 2005-03-18 : 19:43:55
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?







CODO ERGO SUM
Go to Top of Page
   

- Advertisement -