cancel
Showing results for 
Search instead for 
Did you mean: 

BPA Date Calculation

0 Kudos

Hi Experts,

I am facing a issue with the date calculation in BPA wherein a redwood expression is calculating random dates. My requirement is to calculate a date with an offset of 7 hours. The expression which is use is

=Time.format(Time.expression(Time.now(),'subtract 7 hour truncate day'), 'dd.MM.yyyy') .

for some cases it seems that the logic is calculating dates based on creation date rather than time know. Also, its quite random and doesn't happen frequently.

Is this a known issue or something is missing.

Thanks,

RItesh

Accepted Solutions (1)

Accepted Solutions (1)

gmblom
Active Contributor
0 Kudos

Hello,

Is your parameter setup as a Runtime parameter or not? Runtime parameters should evaluate at the time of the job start.

Also it might be better to also set the expected TimeZone as well to be sure you get the date back in the correct time zone:

=Time.format(Time.expression(Time.now('Europe/Amsterdam'),'subtract 7 hour truncate day'), 'dd.MM.yyyy')

Regards Gerben

0 Kudos

Hi Gerben,

Thanks for your reply..I had missed the run time parameter. The issue is now resolved.

Thanks,

Ritesh

Answers (0)