Quarter Function

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
jpockets
Participant
Posts: 12
Joined: Tue Mar 14, 2006 11:19 am

Quarter Function

Post by jpockets »

I'm was looking at the help file for a way to find out the quarter from a date, and this is what i found.

[quote]Q outputs the quarter of the year as a number from 1 through 4.[/quote]

So in the transformer i used this logic to get the quarter:

[code]Oconv(Iconv(LP_POLICY_SALES.LedgerDate,"D2-")," DQ")[/code]

Ledger Date is coming in as : "31-AUG-07" that is why i used the iconv.

When using that logic that value i'm getting is: LEDGER_QUARTER = 14488

How can i correct this?
jpockets
Participant
Posts: 12
Joined: Tue Mar 14, 2006 11:19 am

Post by jpockets »

It was an stuipd mistake, there was a space in the logic it's working now. thanks for anyone who looked at this...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Well done for finding it. Now perhaps you could mark the thread as resolved?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply