on 11-06-2012 3:46 PM
Good Morning Everybody,
Does anyone know about Julian date?
Its a date format where it has something to do with the date count. Can anybody tell me if there is a function in crystal reports or if somebody has a formula which works for that. I need current date converted to the julian date.
for more information on Julian dates :
http://amsu.cira.colostate.edu/julian.html
http://astronomy.villanova.edu/links/jd.htm
It would be great if somebody could help me with this.
Hi Vasu,
Crystal Reports does not come with an in-built function for Julian Dates. There is however, a UFL called "UFLJUL" that can be downloaded from here:
https://smpdl.sap-ag.de/~sapidp/012002523100006019242008E/ufljul.exe
Unzip the file and copy the 2 dlls (U2LJUL.DLL and UFLJUL.DLL) to (assuming you're using CR 2008)
C:\Programs Files\Business Objects\ Business Objects Enterprise 12.0\win32_x86
If everything goes well, there will be two functions available in the Formula Editor Window under "Functions" called
DateToJulian(date) and
JulianToDate(n)
Hope this helps!
- Abhilash
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Nrupali,
But the formual doesnt work. The expected date have to be 2456238 but it is showing 2445675
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Abhilash And nrupali...
You Guys saved my day.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vasu,
To convert the current date to Julian Date create a formula as:
numberVar k:=year(CurrentDateTime);
numberVar m:= month(CurrentDateTime);
numberVar l:=day(CurrentDateTime);
timeVar ut:= time(CurrentDateTime);
numberVar ut1:= hour(ut)+(Minute(ut)/60)+(Second(ut)/60);
numberVar JD;
JD:= (367*K) - Truncate(7*(k+Truncate((m+9)/12)/4))+ Truncate((275*m)/9)+l+ 1721013.5+(ut1/24)- (0.5*sgn((100*K)+M-190002.5))+ 0.5 ;
Hope this helps!
- Nrupal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.