Add Hours to DateTime and Xpath

2
Hi, I would like to know if it is possible to add hours on a date and use it on Xpath. Specifically I want to show some data in a datagrid, but I just want to show the objects whose time of operation is still valid: ['[%CurrentDateTime%]' < objectStartTime + objectDurationHours] The attribute 'objectStartTime' is a DateTime datatype and the objectDurationHours is an integer.
asked
3 answers
4

I would try

[objectStartTime > '[%CurrentDateTime%] - objectDurationHours * [%HourLength%]']

Hopefully doing the calculation on the right-hand side with the current datetime will mean a single calculation, rather than a calculation for each record

Note that the tick marks start before [%CurrentDateTime%] and end after [%HourLength%]

answered
1

This is for instance valid: [Datum < '[%CurrentDateTime%] + 1 [%DayLength%]']

see also link text

answered
0

You'll need to use a seperate attribute where you save this time/date.

module.enddate = addHours(objectStartTime, objectDurationHours)

You can then use

[module.enddate < '[%CurrentDateTime%]']

answered