COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: jd on 11 Jan 2011 09:26:30 AM

Title: How to Convert Date Into Julian Date in Frame work manager
Post by: jd on 11 Jan 2011 09:26:30 AM
How to Convert Date Into Julian Date in Frame work manager
Title: Re: How to Convert Date Into Julian Date in Frame work manager
Post by: S2000 on 11 Jan 2011 10:56:43 AM
I don't think there is an inbuild function.
I think the best way is to combine a number of datepart functions and then add them together.

For example (using pseudo sql)
year(date) *1000
+
day of year(date)

You may need to add a 10000 to that depending on whether your flavour of Julian date has the century or not.

This is from memory- apologies if I'm off by a factor of 10.. or more.

Title: Re: How to Convert Date Into Julian Date in Frame work manager
Post by: jive on 11 Jan 2011 12:49:03 PM
HI ,

I took this calculation from wikipedia and after talking from one of my friend he tells me it's an accurate form of calculation. I also like the they present that, just check on wikipedia. the link is

http://en.wikipedia.org/wiki/Julian_day#Converting_Gregorian_calendar_date_to_Julian_Day_Number