Posted: Fri May 09, 2003 9:33 am Post subject: Calculate the previous days date.
Apprentice
Joined: 21 Apr 2003 Posts: 28
I need to write some ESQL in a compute node that will calculate the previous days date in ccyy-mm-dd format. The code has to be smart enough to
1) cross months. Example if today is "2003-05-01" the code returns "2003-04-30".
2) Cross years.
Any suggestions or sample code would be greatly appreciated.
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
Please take a look at INTERVAL datatype. You can add an Interval value, for example, 1 year, 1 month, etc. to get a new DATE. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum