how to get quarter date format
Moderators: chulett, rschirm, roy
how to get quarter date format
Hi all,
I want to get the quarter format like
for the input link
Inlink.field1 Inlink.field2
5848 May 08
5848 July 08
Outlink.field1 Outlink.field2
5848 2008Q2 for 2nd quarter
5848 2008Q3 for 3rd quarter
I tried for Oconv(Iconv(Inlink.field2,'D MY[A3,2]'),'DQYQ')
It's giving me result what I am not expecting (obivously, its returning again quarter value)
but how to get Q inserted inbetween year and quarter
any ideas are welcomed
I want to get the quarter format like
for the input link
Inlink.field1 Inlink.field2
5848 May 08
5848 July 08
Outlink.field1 Outlink.field2
5848 2008Q2 for 2nd quarter
5848 2008Q3 for 3rd quarter
I tried for Oconv(Iconv(Inlink.field2,'D MY[A3,2]'),'DQYQ')
It's giving me result what I am not expecting (obivously, its returning again quarter value)
but how to get Q inserted inbetween year and quarter
any ideas are welcomed
Re: how to get quarter date format
In other words, you need to handle the 'Q' and insert it between the two other elements.pxraja wrote:but how to get Q inserted inbetween year and quarter
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Simply apply the QUARTER.TAG transform. This gives yyyyQn (a standard format specified in ISO 8601).
If you require nQyyyy then something like the following will do it.
Or, if you require a two-digit year, the following.
If you require nQyyyy then something like the following will do it.
Code: Select all
Oconv(Iconv(InLink.TheDate,"DMY[A3,2]"),"DQY['Q']")
Code: Select all
Oconv(Iconv(InLink.TheDate,"DMY[A3,2]"),"D2QY['Q']")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
I am facing the same situation here. I have a date type field. What is the syntax for QUARTER.TAG? Is it expecting a date type or internal? I am currently running a server job and the first lines in the job log in Director is a warning that QUARTER.TAG was passed a non-numeric value. Will the job still finish with the correct results?
Is there any way to pull this off in a parallel job? I tried using QUARTER.TAG, but got an error as soon as I entered it in Transformer.
Again, I have a date field. And I want to get the year and quarter in this format: 2010Q1
And I prefer to do everything in a parallel job rather than a server one.
Thanks in advance.
Is there any way to pull this off in a parallel job? I tried using QUARTER.TAG, but got an error as soon as I entered it in Transformer.
Again, I have a date field. And I want to get the year and quarter in this format: 2010Q1
And I prefer to do everything in a parallel job rather than a server one.
Thanks in advance.
Todd Ramirez
Sr Consultant, Data Quality
San Antonio TX
Sr Consultant, Data Quality
San Antonio TX
-
- Participant
- Posts: 21
- Joined: Mon Mar 16, 2009 3:59 am