Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Julian Date Format
rmendonsa
Need help in converting the current date in BIRT to a Julian Date format.
Thanks.
-Raynah
Find more posts tagged with
Comments
mwilliams
You just want to convert the current (today's) date to julain format? Have you looked around the web to see if there is a conversion function already available for use? Otherwise, you'll just have to write your own function/script to convert the date.
pricher
Attached is an example based on some JS snippet I have found on the web. I have added the JS function to the initialize method of the report. Then, in the data set, I call the JS function in a computed column.
Hope this helps!
P.
igillen
<p>Spent a little too much time myself to find the answer to this, so I thought I'd save the next person some time:</p>
<p>If you are looking "Julian Date/Day" is commonly used in industry to refer to how many days of the year have passed since january 1st of the current year. (As opposed to the simply a continuous count of days and fractions since noon Universal Time on January 1, 4713 BC).</p>
<p> </p>
<p> </p>
<p>If it's the first you are after, I found a simple solution built into BIRT via the function <strong>BirtDateTime.dayOfYear().</strong> I did initially look in the native javaScript functions, but not the BIRT functions. Would have saved me a lot of time and frustration!</p>
<p> </p>
<p>If you wanted to calculate the number for today, you add a computed column to your dataset with the following expression: <strong>BirtDateTime.dayOfYear(new Date())</strong></p>