View previous topic :: View next topic
|
Author |
Message |
sm_2009
New User
Joined: 10 May 2009 Posts: 72 Location: bangalore
|
|
|
|
hi
i need to check input date in file is falling between two given dates.
pls suggest
thanks |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
NOTEB: Between means inclusive of lower and higher value.
If input-date GTEQ lower-given-date
and input-date LTEQ higher-given-date
then
the input-date falls between the two given dates. |
|
Back to top |
|
|
sm_2009
New User
Joined: 10 May 2009 Posts: 72 Location: bangalore
|
|
|
|
wht is the format you suggest?
all dates are pic x(10) yyyy-mm-dd
will it work this format?
pls suggest |
|
Back to top |
|
|
star_dhruv2000
New User
Joined: 03 Nov 2006 Posts: 87 Location: Plymouth, MN USA
|
|
|
|
Try convert dates in integer and compre them. Use DATE-OF-INTEGER and INTEGER-OF-DATE functions.
Basic date format in INTEGER-OF-DATE is CCYYMMDD.
Happy coding !!!
Cheers |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I must be missing something. . .
Quote: |
If input-date GTEQ lower-given-date
and input-date LTEQ higher-given-date
then
the input-date falls between the two given dates. |
How difficult is it to use the example posted by dbz and compare if a value is between 2006-10-01 and 2008-05-23?
Why would anything else be needed? |
|
Back to top |
|
|
|