Find # days between 2 dates in a AS/400 query

20 pts.
Tags:
AS/400 Query
How do I find the # of days between 2 dates. I'm trying to do this in AS/400 Query 400. I'm looking to do this in the Results area where you do calculations. Can anyone help??? Thanks!!!!!
ASKED: May 24, 2008  4:06 PM
UPDATED: November 18, 2013  4:43 PM

Answer Wiki

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

Hi,

You should be able to do this using the DAYS function :-

DAYS(Enddate) – DAYS(Startdate)

Regards,

Martin Gilbert.

Discuss This Question: 3  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
  • Pherrick
    I'm looking to find the # of days between 2 dates in the AS/400 Query 400. I'm guessing it can be done in the results section of the query (where calculations are done). Any ideas????? Thanks!
    20 pointsBadges:
    report
  • alessandro.panzetta
    Hello Pherrik, I'm not really familiar with AS400 but I suppose that a DateDiff command should exist, try and search in the manuals.
    9,725 pointsBadges:
    report
  • Gilly400
    Hi, You should be able to do this using the DAYS function :- DAYS(Enddate) - DAYS(Startdate) Regards, Martin Gilbert.
    23,730 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