Skip to Content

Date generation transform error.

Hello,

I am facing a problem using global variable. I declared a global variable as $Todays_date and passed a value ‘2016.10.21’ to it. Also in script I wrote: -

$Todays_date = to_date(‘2016.10.21’,’yyyymmdd’);

Print = ($Todays_date);

In date generation transform I passed the start date value as $Todays_date.

When I ran the job it says start date cannot be less than end date. When I modified the job data starting from ‘1900.01.01’ till end date is getting printed.

But I want to load the data from 2016.10.21 to 2016.11.21.

I am able to do it successfully only when I declare the values of start and end date in data generation options.

Please help.

Thanks,

Rajan

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 22, 2016 at 09:50 AM

    Try

    $Todays_date = add_months( sysdate(),-1);

    print($Todays_date);

    Result of Date Generation

    Regards

    Arun Sasi

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 22, 2016 at 09:51 AM

    $Todays_date = add_months( sysdate(),-1);


    print($Todays_date);

    Result of Date Generation

    Regards

    Arun Sasi

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 22, 2016 at 10:50 AM

    Screenshot was not posted earlier in my reply

    You can use another variable in End Date as per your requirement

    Regards

    Arun Sasi

    Add comment
    10|10000 characters needed characters exceeded