Can I get a value/ display Julian date of present day?
Remind us what's the Julian date?
Is that Day in Year combined with the year, like
Clock1.FormatDateTime(Clock1.Now(), 'yyD' ?
Or is it the one used by astronomers?
(see SimpleDateFormat (Java Platform SE 7 ) for formatting codes)
It is the second one, which is used by astronomers.
You should be able to calculate it using the formulas at https://en.wikipedia.org/wiki/Julian_day
and the value of Clock1.SystemTime.
Do you need math help?
Let me try first, I will let you know if I need any further help. Thanks for guidance.
I browsed the article I mentioned earlier.
You have opened a can of worms.
There are at least a dozen different kinds of Julian date.
Be sure you and your users are on the same page.
I have got the right calculation and also verified the number from online available calculator. both values are exact match, now the final value is displaying as scientific notation, I want the result as full integer, is there any function which can convert it to string or something?
Code lock is below:
Result format is:
Look in the math blocks section for a FORMAT AS DECIMAL block. Give it 0 fractional digits.
Also, use external sockets for each math block, to avoid the torn sail appearance of your blocks and to help show their nesting vertically.
(not tested, in a rush)
P.S.
2.45E6 is about 2 million.
2 million days is a long time historically (Adam and Eve?) , and a short time astronomically.
Are you SURE you have the right formula?
Thanks for a fun question!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.