View previous topic :: View next topic
|
Author |
Message |
shelu280
New User
Joined: 12 Jan 2009 Posts: 9 Location: chennai
|
|
|
|
what will be a logic
If i have one date given ,other date is from system how to no days between it |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Depending on the language, there frequently is a function to generate this difference. If not, you have to write a routine to calculate it. |
|
Back to top |
|
|
shelu280
New User
Joined: 12 Jan 2009 Posts: 9 Location: chennai
|
|
|
|
IN COBOL
I TRIED THE FUNCTION INTEGER OF DATE BUT I DOES'NT WORK SO WHAT WILL BE THE LOGIC |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
TURN YOUR CAPS OFF. . .
Do not post "it didn't work" - that provides nothing for anyone to use to help you.
What happened? An abend? An unexpected result? A syntax error.
You need to provide all of the meaningful diagnostic info. Then someone may have a suggestion. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
Something like this should have worked
Code: |
COMPUTE WS-DAYS = FUNCTION INTEGER-OF-DATE (WS-DATE-1) -
FUNCTION INTEGER-OF-DATE (WS-DATE-2) |
|
|
Back to top |
|
|
shelu280
New User
Joined: 12 Jan 2009 Posts: 9 Location: chennai
|
|
|
|
Hi,
when i tried above code it give an error
1.FUNCTION WAS NOT DEFINED AS A DATA-NAME
2. INTEGER-OF-DATE WAS INVALID |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
When you post error messages, you neet to post the message-id also.
If you copy/paste the actual code with the error(s) following it will help (use the "Code" tag to preserve slignment and improve readability).
Also, post the version of the compiler you are using (this will be at the top of compiler output). |
|
Back to top |
|
|
|