March 5, 2008 at 6:25 pm
I am downloading a table form AS400/DB2 and must convert GetDate() in T-SQL to hundred year date so that I may query the downloaded table.
Does anyone have a solution?
Thanks,
Stan
March 6, 2008 at 3:43 am
I think you want to capture number of days between 1900/01/01 and another date which is in your table. you can use datediff function.
datediff(dd,startdate,enddate)
for example -
select datediff(dd,'1900/01/01','2008/03/05') gives you 39510
for more - http://msdn2.microsoft.com/en-us/library/ms189794.aspx
March 6, 2008 at 9:10 am
Thank you very much, Jay. I will try your suggestion today!
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy