View previous topic :: View next topic
|
Author |
Message |
Ding_MF
New User
Joined: 31 Aug 2005 Posts: 3
|
|
|
|
I have to increment a date(a working storage variable PIC X(10)..)
I have tried with
EXEC SQL
SET :WS-START-DTE = (cast(:WS-START-DTE as date) +1 DAY)
END EXEC
WS-NEW-START-DTEM is a working storage variable..
That too is not working..
Could anyone help me out...
Thanks... |
|
Back to top |
|
|
mathiprakash
New User
Joined: 29 Apr 2005 Posts: 14 Location: Pune, India.
|
|
|
|
Try this,
EXEC SQL
SET :WS-START-DTE = DATE(:WS-START-DTE) + 1 DAY
END EXEC
Regards,
Matty |
|
Back to top |
|
|
Ding_MF
New User
Joined: 31 Aug 2005 Posts: 3
|
|
|
|
Hi Matty,
Thanks for the help..
I tried it out..But it is giving -180 sqlcode...
Now I have given the character string date format as 'MM/DD/YYYY'...
Do we need it in ISO format YYYY-MM-DD format?
Do you have any idea on this?
Thanks....... |
|
Back to top |
|
|
kvivek
New User
Joined: 09 May 2005 Posts: 51 Location: Singapore
|
|
|
|
Quote: |
Do we need it in DB2 format YYYY-MM-DD format? |
Yes |
|
Back to top |
|
|
|