Page 1 of 1

transformer function

Posted: Mon Dec 10, 2007 2:13 pm
by just4u_sharath
IF i give a data(200012) in the format (yyyymm). can i get the starting date and ending of that respective month. In this case can i get the starting date of 2000year december month (ofcourse starting day for all months will be 1, but is there any function) and ending date of 200year december month( this will vary, may be 30,31,28, 29).

Posted: Mon Dec 10, 2007 3:24 pm
by DSguru2B
THe parallel job function library does'nt have anything to get the last day of month, given the year and month.
First day is easy, you can just hardcode that. For last day, you can either go with a basic function, with the price of sacrificing parallelism, or construct your own c code to do this.
It will be a small function that will take in the year and month, parse for year, then apply leap year check on it and then check for month and get the last day.

transformer function

Posted: Mon Dec 10, 2007 5:00 pm
by just4u_sharath
Thanks for the reply.
Can you please give me the specific function with which i can access the last day of month. i looked for it in documentation but i didnt find it. Please reply

Posted: Tue Dec 11, 2007 2:00 am
by ray.wurlod
There isn't one. You have to write your own. Get the logic from MONTH.LAST Transform from the server job side of the fence.