Question

Asked:
Asked By:
May 24 2008   4:06 PM GMT
Pherrick   20 pts.

Find # days between 2 dates in Query 400


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!!!!!

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0




Hi,

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

DAYS(Enddate) - DAYS(Startdate)

Regards,

Martin Gilbert.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Pherrick   20 pts.  |   May 24 2008  4:11PM GMT

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!

 

Alessandro.panzetta   9615 pts.  |   May 26 2008  9:25AM GMT

Hello Pherrik,
I’m not really familiar with AS400 but I suppose that a DateDiff command should exist, try and search in the manuals.

 

Gilly400   23625 pts.  |   May 26 2008  10:17AM GMT

Hi,

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

DAYS(Enddate) - DAYS(Startdate)

Regards,

Martin Gilbert.