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
 SQL Server Development (2000)
 How to Convert a Binary Date

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-01-05 : 08:09:59
Alan writes "Hi All,

My problem is a bit more complicated than the subject suggests.

I had an application that stored dates as binary (4 bytes) in SQL 6.5. I have now moved imported this data into a sql 2000 database without any transformation i.e. the dates are now stored as binary (8 bytes).

What I would like to be able to do is query this data on an adhoc basis, but will need to somehow convert the dates to a readable format.

Where do I need to go with it please?

TIA and Merry Christmas,

Alan."

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-01-05 : 09:31:52
can't be as simple as
convert(datetime, convert(int, YourBinaryDateColumn))
can it?

Go with the flow & have fun! Else fight the flow
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2005-01-05 : 10:17:32
YOu need to tell us the spec of how the date is stored in this binary format. What spirit suggested might work, but without a spec, who knows?

- Jeff
Go to Top of Page
   

- Advertisement -