Page 1 of 1

Date transformations

Posted: Thu Jan 05, 2006 8:40 am
by meena
Hi All,
I want to know how can we add number of months to today's date in the transformer. something like " DATE() + 12 MONTHS". As I know I can add in sql by using a sql meta tag : %dateadd( date,-no of days). But I want to do it in the transformer by writing a simple stage variable expression.

with regards,
Meena

Posted: Thu Jan 05, 2006 9:07 am
by ArndW
Appendix B-1 of the Parallel Job Developer's Guide lists the functions you can use, in your case DateFromDaysSince look like the appropriate one to use.

Posted: Thu Jan 05, 2006 9:12 am
by thebird
Hi Meena,

There is a function available in the Transformer - DateFromDaysSince(date,number of days),
that lets you add/subtract a certain number of days from a given date.

The second arguement in the function is of int32 type while the first is of date type.

This function is available in the Transformer, at Date & Time under Functions.

Hope this helps.

Regards,

The Bird.

Posted: Fri Jan 06, 2006 10:32 am
by meena
Hi,
The function worked for me.

Thank you
Meena