Groups | Blog | Home
all groups > sql server (alternate) > june 2005 >

sql server (alternate) : How do I bring in a date which is in Integar form into a databse as a date form.


s commar
6/28/2005 8:54:53 PM
Hi

I have a Platinum database which stores dates in integer form e.g the date
is formatted as below:

Column_name Type Length Precision
------------------------------ ------------------------------
from_date int 4 10


Some of the dates in the Platinum database are as follows:

729115
729359
730059
730241
730302
730455

How can I bring them into SQL 2000 as valid dates.

Thanks for your assistance

Sam C
s_commar@hotmail.com



Erland Sommarskog
6/28/2005 10:00:26 PM
s commar (scommar@verizon.net) writes:
[quoted text, click to view]

1) Find out how these values are defined. It looks to me that they are
offsets from some base date.
2) Assuming that it is a base date, look up the dateadd function and
friends in Books Online.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
AddThis Social Bookmark Button