DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic has been marked "Resolved."
Author Message
jackson.eyton



Group memberships:
Premium Members

Joined: 26 Oct 2017
Posts: 127

Points: 2073

Post Posted: Tue Oct 09, 2018 8:46 am Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Server
OS: Windows
Does anyone know how I would go about getting the end of quarter date for the current quarter? We have some processes that need to run a loop, once for just end of month, twice for end of month if that is also the end of quarter, and three times if that end of month is also the end of the year. I made a post earlier about the end of month, I got that one down, end of year is also pretty straight forward. I am not too sure on the end of quarter date. I saw that I can get the quarter number using Oconv/Iconv but I can't wrap my head around how to use that for what I am needing. Any suggestions would be greatly appreciated.

_________________
-Me
jackson.eyton



Group memberships:
Premium Members

Joined: 26 Oct 2017
Posts: 127

Points: 2073

Post Posted: Tue Oct 09, 2018 11:29 am Reply with quote    Back to top    

ok, never mind again.... I really didn't think this one through, got it after lunch...

Q1: Oconv(Iconv(@YEAR:"03":"31","D-YMD[4,2,2]"), "D-YMD[4,2,2]")
Q2: Oconv(Iconv(@YEAR:"06":"30","D-YMD[4,2,2]"), "D-YMD[4,2,2]")
Q3: Oconv(Iconv(@YEAR:"09":"30","D-YMD[4,2,2]"), "D-YMD[4,2,2]")
Q4: Oconv(Iconv(@YEAR:"12":"31","D-YMD[4,2,2]"), "D-YMD[4,2,2]")

_________________
-Me
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54407
Location: Sydney, Australia
Points: 295092

Post Posted: Tue Oct 09, 2018 5:20 pm Reply with quote    Back to top    

Check out the supplied Transform called QUARTER.LAST

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne (especially seeking good business analysts)
Rate this response:  
jackson.eyton



Group memberships:
Premium Members

Joined: 26 Oct 2017
Posts: 127

Points: 2073

Post Posted: Thu Oct 11, 2018 9:12 am Reply with quote    Back to top    

Oconv(QUARTER.LAST(Oconv(@DATE, "DY[4]") : "Q" : Oconv(@DATE, "DQ")),"D-YMD[4,2,2]")


Interesting.......

_________________
-Me
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
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



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours