Wednesday, March 3, 2010

Layout Calculations involving _add_days / _add_years functions

Note that the _add_days, _add_years functions in query calculations take a date expression as an input while the same in a layout calculation takes a timestamp as an input. Hence while using layout calculations you need to convert the date to timestamp as shown below:

_add_years(date2timestamp(Today()),-1)

3 comments:

Anonymous said...

Awesome! You just saved me two hours of work. Thanks!

Zephyr said...

Great to know that this blog is serving its purpose. Thank you all for your kind words.

Dom said...

I second that - thanks!