In FreeMarker, I am trying to add one hour to a timestamp which is in the format "2016-08-11T20:06+06:00".
I have tried and searched on Google, but didn't find way to add hours to the current timestamp. The new timestamp should be current system timestamp plus one hour.
I am getting the following error.
For "." left-hand operand: Expected a hash, but this has evaluated to a date_or_time_or_datetime (wrapper: f.t.SimpleDate): ==> current [in nameless template at line 2, column 19] FTL stack trace ("~" means nesting-related): - Failed at: #assign newDate = current.add(10, 1) [in nameless template at line 2, column 1]
<#assign current= .now> <#assign newDate= current.add(10,1) > ${newDate}
I have tried this but getting above error. Please help me out.