Subtracting specific number of hours from timestamp
I am translating some SQL into QlikView script. In the SQL script exactly ONE hour is subtracted from a time stamp using
dateadd(hour, -1, 'YYYY-MM-DD HH:mm:ss.fff')
I want to do the same in the QV script, but don't know how to. The addmonths won't work, neither will the interval function, as I am not trying to subtract two time stamps from one another, rather a number of hours (integer) from a time stamp.
// Say my original time stamp is 2011-10-03 04:19:17.000
// I want to display XXX as the value 2011-10-03 03:19:17
// Notice that I've dropped the fraction and the hour is one less than the original.
// Here I am forcing QlikView to see the field TS_EVENT as a time value.