certainly $lastweek = add($thisweek,-1) won't work much better because $lastweek is probably not an integer...
What datatype is $lastweek ? If this is inside a module, you may perhaps get around the problem by calculating the value through the php code and using a template variable to get it back? If $lastweek is a date/time and the operator hasn't been implemented in the template language, you probably will have to write a template operator for this. I always have a small module with useful stuff included in my install, so adding a template operator isn't much work...
</Pascal>
You must be logged in to post messages in this topic!