|
"Holden Tommy" <Tommy.Holden@xxxxxxxxxxxxxxxxx> wrote:
> Today = %date();
> JanFirst = %Date('2006-01-05':*ISO0);
> JulianDay = %Diff(Today:JanFirst:*Days);
As Scott and others pointed out the *LONGJUL format allows you to avoid
calculating the day number this way, but there are some errors in the above
code snippet anyway. You would also want to avoid hard-coding the year of
the January 1st date. Douglas said he was interested in retrieving the day
number of the current year, so the following tweaked version ought to work.
Today = %date();
JanFirst = %Date(%char(*year) + '-01-01':*ISO);
JulianDay = %Diff(Today:JanFirst:*Days) + 1;
--
Dave...
______________________________________________________________________
This message may contain confidential information which may also be legally
privileged and is intended only for the use of the parties to whom it is
addressed. If you are not an intended recipient you are hereby notified that
any disclosure, copying, distribution or use of any information in this e-mail
is strictly prohibited. If you receive this message in error please notify the
sender by return e-mail and then destroy it. Further, we make every endeavour
to keep our network free from viruses. However, you do need to verify that this
e-mail and any attachments are free of viruses as we can take no responsibility
for any computer viruses which might be transferred by way of this e-mail. All
information and attachments remain the property of Stolt Offshore Group and
should be held as confidential.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.