IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Finding last day of the month from the Current date in EZT


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
satheeshkamal

New User


Joined: 09 Jan 2007
Posts: 28
Location: Chennai

PostPosted: Wed Jan 07, 2009 10:03 pm
Reply with quote

Hi All,

I need to findout the Last month's last day (i.e. 31/12/2008) and current month's first day (i.e. 01/01/2009) using EZT. Can anybody help me to manipulate these dates?

Thanks in advance...
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Thu Jan 08, 2009 10:59 am
Reply with quote

Hi,

You may try using SYSDATE-LONG (MM/DD/CCYY). This should give you current date. Once you have the current date. You will have to manipulate the day part of current date to '01' . You will get FIRST DAY of MONTH.

For LAST day of MONTH you need to use a more complex logic, may be few evaluate statements to identify the no. of day in that month.

OR

If you can use EZT along with DB2. Then its much easier using date functions of DB2. Ex : LAST_DAY(Current _date).

Thanks,
-Kapil.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts VB to FB - Finding LRECL SYNCSORT 4
Search our Forums:

Back to Top