View previous topic :: View next topic
|
Author |
Message |
hiravibk Warnings : 1 Active User
Joined: 14 Dec 2008 Posts: 107 Location: India
|
|
|
|
Hi All,
Aow to get yesterdays in Easytrieve??is there any command or function for taht?
Thank you,
Ravi |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Subtract one from today's date.
And check for date going to zero. |
|
Back to top |
|
|
murugan_mf
Active User
Joined: 31 Jan 2008 Posts: 148 Location: Chennai, India
|
|
|
|
Hi,
Define a variable and set the variable equal to:
SYSDATE - 1
The date format will be (mm/dd/yy format)
OR
SYSDATE-LONG - 1
The date format will be (mm/dd/ccyy format) |
|
Back to top |
|
|
hiravibk Warnings : 1 Active User
Joined: 14 Dec 2008 Posts: 107 Location: India
|
|
|
|
Hi,
I tried the following code.
Code: |
ws- date w 008 a
*
*
ws-date = sysdate - 1
*
*
|
Bu t ia m getting the error
Invalid length,type or decimal places ws-date
Invalid length,type or decimal places sysdate |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
hiravibk wrote: |
Hi,
I tried the following code.
Code: |
ws- date w 008 a
*
*
ws-date = sysdate - 1
*
*
|
Bu t ia m getting the error
Invalid length,type or decimal places ws-date
Invalid length,type or decimal places sysdate |
Think, how would you subtract one day from DD when the DD was part of a character variable consisting of MM/DD/YY?
You say you have COBOL skills, how would you do it in COBOL? The EZT way would be the same...... |
|
Back to top |
|
|
murugan_mf
Active User
Joined: 31 Jan 2008 Posts: 148 Location: Chennai, India
|
|
|
|
Ravi,
The date should be converted to julian before subtracting one from the date. DATECONV routine converts a date from one format to another. |
|
Back to top |
|
|
|