Julian date
Ken Langendock
ken.langendock at rogers.com
Mon Mar 15 12:03:33 CDT 2010
The problem with using an HP system variable is the code becomes
non-portable.
If you are planning on porting this application down the road at any time.I
suggest NOT using any O/S variables.
Ken
From: powerh-l-bounces+ken.langendock=rogers.com at lists.sowder.com
[mailto:powerh-l-bounces+ken.langendock=rogers.com at lists.sowder.com] On
Behalf Of Lowe, Chuck J
Sent: March 15, 2010 12:36 PM
To: Pickering, John (NORBORD); Ken at Langendock.com; powerh-l at lists.sowder.com
Subject: [Bulk] RE: [Bulk] Julian date
Thanks guys.
John, I'm going with Ken's version. I need the actual Julian day, 074 for
today's date. His solution gives me that in D-CurrentDay.
The option you give is for reporting only. I need to store it in a batch
header record with QTP.
Unless you can tell me how to do that in your version.
Either way, I appreciate both answers.
PS. Just found out there is a system variable set HPDOY that will also
give me it.
GLO TEMP JULIAN-DAY ZON*03 INIT NCON(GETSYSTEMVAL("HPDOY")[1:3])
_____
From: Pickering, John (NORBORD) [mailto:John.Pickering at norbord.com]
Sent: Monday, March 15, 2010 11:18 AM
To: Ken at Langendock.com; Lowe, Chuck J; powerh-l at lists.sowder.com
Subject: RE: [Bulk] Julian date
There is likely no need for Ken's complicated conversion logic!
Just define your date item as type "jdate" and Powerhouse will convert to
Julian format. If you are converting from a century included date then
you'll need to use the removecentury function. As in:
>define d-julian-date jdate = removecentury(sysdate)
>report sysdate d-julian-date format yyddd
Note that any date may be displayed in any format. Even a jdate will be
displayed in the dictionary's default format so you'll probably need to
include the format option.
JWP
_____
From: powerh-l-bounces+john.pickering=norbord.com at lists.sowder.com
[mailto:powerh-l-bounces+john.pickering=norbord.com at lists.sowder.com] On
Behalf Of Ken Langendock
Sent: Monday, March 15, 2010 11:12 AM
To: 'Lowe, Chuck J'; powerh-l at lists.sowder.com
Subject: RE: [Bulk] Julian date
Try this
; Julian Date Calculations
DEFINE D-CurrentYY CHARACTER * 2 &
= ASCII(SYSDATE,8)[3:2]
DEFINE D-JanuaryFirst DATE &
= NCONVERT(ASCII(SYSDATE,8)[1:4] + "0101")
DEFINE D-CurrentDay CHARACTER * 3 &
= ASCII(DAYS(SYSDATE) &
- DAYS(D-JanuaryFirst) + 1,3)
DEFINE D-JulianDate CHARACTER * 5 &
= D-CurrentYY &
+ D-CurrentDay
From: powerh-l-bounces+ken.langendock=rogers.com at lists.sowder.com
[mailto:powerh-l-bounces+ken.langendock=rogers.com at lists.sowder.com] On
Behalf Of Lowe, Chuck J
Sent: March 15, 2010 10:59 AM
To: powerh-l at lists.sowder.com
Subject: [Bulk] Julian date
I must be having a bad day. Can anyone give me the code to find out the
Julian date for a day . I.e. February 2nd would be 33. In QTP would be
preferable.
Thanks!
Chuck Lowe Quest Diagnostics | Sr. Programmer/Analyst,SYS Billing
System/Denver| 400 Egypt Rd. | West Norriton, PA 19403 USA | phone
610-650-6679| fax 610-650-2111 |
<mailto:Chuck.J.Lowe at questdiagnostics.com> Chuck.J.Lowe at questdiagnostics.com
| <http://www.questdiagnostics.com/> www.QuestDiagnostics.com
Please think about resource conservation before you print this message
------------------------------------------
The contents of this message, together with any attachments, are intended
only for the use of the person(s) to which they are addressed and may
contain confidential and/or privileged information. Further, any medical
information herein is confidential and protected by law. It is unlawful for
unauthorized persons to use, review, copy, disclose, or disseminate
confidential medical information. If you are not the intended recipient,
immediately advise the sender and delete this message and any attachments.
Any distribution, or copying of this message, or any attachment, is
prohibited.
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10
03:33:00
------------------------------------------
The contents of this message, together with any attachments, are intended
only for the use of the person(s) to which they are addressed and may
contain confidential and/or privileged information. Further, any medical
information herein is confidential and protected by law. It is unlawful for
unauthorized persons to use, review, copy, disclose, or disseminate
confidential medical information. If you are not the intended recipient,
immediately advise the sender and delete this message and any attachments.
Any distribution, or copying of this message, or any attachment, is
prohibited.
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10
03:33:00
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20100315/3e4a7bfd/attachment.htm
More information about the powerh-l
mailing list