IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Date Comparison in Rexx


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Adit Nigam

New User


Joined: 08 Apr 2010
Posts: 9
Location: Bangalore

PostPosted: Tue Apr 13, 2010 5:26 pm
Reply with quote

Can anyone tell me how can I compare two dates in Rexx. is there a direct function?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Apr 13, 2010 5:31 pm
Reply with quote

What manuals have you read. They are available from the sticky topic at the top of the CLIST / REXX forum.

Take a look at the DATE function
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Apr 13, 2010 5:32 pm
Reply with quote

If they are both in the Base date format, then you can subtract one date from the other to determine the number of days.
Back to top
View user's profile Send private message
Adit Nigam

New User


Joined: 08 Apr 2010
Posts: 9
Location: Bangalore

PostPosted: Tue Apr 13, 2010 5:42 pm
Reply with quote

thanks Kevin,

I can get the current date in Base format, but how can I change some date which I am reading from a file to base format? or is there any other method of comparing dates.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Apr 13, 2010 5:44 pm
Reply with quote

I suggest that you read the link that Kevin supplied in his original reply.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Apr 13, 2010 5:45 pm
Reply with quote

the rexx manual will tell all You might want to know about the DATE function
and it' s tranformation capabilities

to save some of Your precious time her is a link to ..
the tso/e bookshelf
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/IKJ4BK80

the rexx guide
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4C310/CCONTENTS?SHELF=IKJ4BK80&DN=SA22-7791-01&DT=20010706113306
te rexx reference
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4A370/CCONTENTS?SHELF=IKJ4BK80&DN=SA22-7790-07&DT=20060626210253
Back to top
View user's profile Send private message
Adit Nigam

New User


Joined: 08 Apr 2010
Posts: 9
Location: Bangalore

PostPosted: Tue Apr 13, 2010 5:58 pm
Reply with quote

Thanks Enrico,

The links were really helpful. I had used the date functions many times but didn't knew all the options available.

Thank you very much
Back to top
View user's profile Send private message
Adit Nigam

New User


Joined: 08 Apr 2010
Posts: 9
Location: Bangalore

PostPosted: Tue Apr 13, 2010 6:03 pm
Reply with quote

sorry Kevin, I didn't realized that you gave the direct link to the date function. icon_cry.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
Search our Forums:

Back to Top