transformer 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
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

transformer function

Post by just4u_sharath »

Suppose the data is in this format ---yyyymm ex---199012 (year--1990, month--december). Now my question i have to fetch the last day of the this month in 1990 year.

given 199012---get last day of month 12 year 1990

given 200203--get last day of month 03 in ear 2002.

can you please help me how can i do this
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The old way is to bump the date to the first day of the next month and then subtract one day from the date, something you could build a routine to do. If you wanted to use what is built into the Server product, investigate the MONTH.LAST transform under the Built-In\Dates category.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply