View previous topic :: View next topic
|
Author |
Message |
mainframe_world
New User
Joined: 22 Jan 2010 Posts: 12 Location: delhi
|
|
|
|
Hi All,
I need to write the logic to check the effective date - one day = exp-date then in that case i need to perform a action.
eg. i have to check the if i am putting eff-date (010110) and exp-date(123109) which is one day less than effective. If this codition satisfied than i have to perform some condition.
One more thing date is in [mmddyy] format only and wanted to check the privious day.
Thanks
Abhi |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
If you're writing your program in COBOL, there are intrinsic functions to convert dates to integers and back, allowing addition and subtraction to easily be done. There is a link to the manuals at the top of this page; click on it, find the COBOL Language Reference manual and look for intrinsic functions. If you're using another language, you might be able to use the LE functions, or you may have to write the code yourself. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
It's amazing how quickly Y2K has gotten forgotten. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Craq, that was 10 whole years ago -- an eternity for managers focused on quarterly results! |
|
Back to top |
|
|
|