Hi,
i need to increment current date by 7 days and i'm wondering if it's possible to do that using a xpath function.
thanks !!
Hi,
i need to increment current date by 7 days and i'm wondering if it's possible to do that using a xpath function.
thanks !!
It is possible in XPATH 2.0. There are a number of date functions.
current-date() + xs:dayTimeDuration('P7D')
If your date is in some numeric format (CTIME, seconds since 1970 (32 bit int), or FILETIME, 100 nanosecond counts since 1601 (64 bit)) then incrementing time is easy. Just add the correct number of seconds (or 100 nanosecond intervals) to the time.
You could convert your format to CTIME via the Java time function library, add the correct number of seconds (86,400 seconds in a day), and then convert it back to your string format, I suppose. Probably not the worlds most efficient approach though.