triSolutionFuse
11 years agoMentor
datesupport FreeMarker context object and addDay method
Hello,
Im trying to build a query which requires a previous date (preferably in UTC) by using the datesupport contect object , but im not getting the desired output. What i've tried so far:
<#assign date_weekago_number = datesupport.now.addDay(-7) />
${date_weekago_number}
Returns: lithium.eval.velocity.DateDisplayTemplateModel@2a20426
using .addWeek(-1) doesnt work either. Any ideas why? Thanks
Tri
i believe its
<#assign date_weekago_number = datesupport.now.addDay(-7).getDateAsString() /> <p>date_weekago_number[${date_weekago_number}]</p>
for comparisons, take a look at this reply by AdamN in this thread
Hope that helps
--Jason