Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Finding last day of the month from the Current date in EZT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
satheeshkamal

New User


Joined: 09 Jan 2007
Posts: 26
Location: Chennai

PostPosted: Wed Jan 07, 2009 10:03 pm    Post subject: Finding last day of the month from the Current date in EZT
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    Post subject: Reply to: Finding last day of the month from the Current dat
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Finding the plan when code compiled u... Ahemad DB2 2 Fri Dec 01, 2017 6:38 pm
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts Comparision with current time arunsoods DFSORT/ICETOOL 5 Thu Nov 09, 2017 10:37 am
This topic is locked: you cannot edit posts or make replies. Comparing current time with the time ... arunsoods SYNCSORT 1 Mon Oct 30, 2017 4:07 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us