Relative newbie/rookie to Cognos:
I am working in Cognos 11.1, trying to use _add_hours() comparing with a create_stamp in the data (SQL Server).
My create_stamp looks like this: 11 Apr, 22 3:30:51 PM
I am trying to pull back records where the create stamp is greater than current_time minus 3 hours.
I have tried the following and none are working:
[wms].[it_f].[create_stamp] > _add_hours ( current_date , -3)
[wms].[it_f].[create_stamp] > _add_hours ( current_time , -3)
[wms].[it_f].[create_stamp] > _add_hours ( current_timestamp , -3)
Tell me where I've gone off the rails here...
Is create_stamp a date or string data type?
They call it a Timestamp data type in the screens I can see.
I'm assuming its a date/time data element. I don't have access to the DB directly (cloud system).
From what you have described
[wms].[it_f].[create_stamp] > _add_hours ( current_timestamp , -3)
will work. Maybe there's a detail you didn't mention.