September 18, 2003 at 6:23 am
quote:
The values are just the number of the day of an year. I have got year in one column, and just the julian day ( as say, 245) in the next column.I did try the code, changing the length of the character to 3, but it might vary too, because the julian day values range from 1 - 365/366.
Any more help...
Thanks A Lot!
declare @yr float, @jd float
select @yr = 2002, @jd = 245
select dateadd(yyyy, @yr - 1900, -1) + @jd
--Jonathan
--Jonathan
September 18, 2003 at 8:24 am
Thanks so much for all the help !!
Thank You Mr.Larsen.
Have a nice day.
September 18, 2003 at 12:40 pm
Why are there so many complex queries out there to do something really simple?
declare @julian-2 int
select @julian-2 = datepart(dayofyear, '2003-01-01')
Select dateadd(dd, @julian-2, '12-31-2002'), @julian-2
Obviously there would have to be some decision on what the year was (stored in column, current year, whatever).
I must be missing something...
Signature is NULL
Viewing 3 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply