get current year

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
abyss
Premium Member
Premium Member
Posts: 172
Joined: Thu May 22, 2014 12:43 am

get current year

Post by abyss »

hi
hi all, i am trying to get current year value from transformer stage, the way i do it is:

Code: Select all

DateToDecimal(CurrentDate(),"%yyyy")
and it output warning message:

Code: Select all

APT_CombinedOperatorController(1),0: Conversion error calling conversion routine decimal_from_date data may have been lost
does anyone know why?

thanks
abyss
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What did you define the target column as? I think if you make it a decimal field with 4 or more digits you shouldn't get this warning.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why not use YearfromDate() function?
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