Julian to Gregorian Date Conv. in DB2 Web Query

0 pts.
Tags:
DB2
iSeries
Query
web query
I have a julian dates stored in the format YYDDD numeric, 5 positions, zero decimal. How do I convert to a true Gregorian date in DB2 Web Query for iSeries?
ASKED: November 7, 2007  4:22 PM
UPDATED: November 15, 2010  6:41 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

The following link is to a draft of a Redbook for DB2 Web Query. Chapter 12 has info on data manipulation.

http://www.redbooks.ibm.com/redpieces/pdfs/sg247214.pdf

In addition, youu can manipulate dates in the Report Assistant using a computed field. Create a new computed field and in the box where the calculation is needed put something like this:

JULIAN/I5 = JULDAT(<i>YOUR_DATE_FIELD</i>, JULIAN);
AND
GREG_DATE/I8 = GREGDT(JULIAN, ‘I8′);

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Screechtx
    Thanks, WaltZ. I read that section but it seems to be only for the developer workbench, which we don't have.
    0 pointsBadges:
    report
  • Wade0435
    RPGLE julian date conversion code: D Wprthr S 8 0 Inz(20101115) D Xcjul S 7 0 /Free Xcjul = %Dec(%Subst(%Char(Wprthr):1:4):4:0) * 1000 + %Diff(%Date(Wprthr): %Date(%Dec(%Subst(%Char(Wprthr):1:4):4:0) * 10000 + 0101) :*D) + 1; XCJUL = 2010319
    10 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following