cancel
Showing results for 
Search instead for 
Did you mean: 

MII Query current_timestamp

reini
Explorer
0 Kudos
369

Hello guys,

is it possible with a mii query that i substract 1 day from the current_timestamp

ex.

where activity_log.date_time > ....-1

thanks for help

Reinhard

View Entire Topic
ajit3204
Explorer
0 Kudos

Hi Reinhard,

Use below query to sustract days. First you have to convert the date string to timestamp and then you can use the add_days.

select ADD_DAYS(TO_TIMESTAMP (ACTIVITY_LOG.DATE_TIME, 'YYYY-MM-DD HH24:MI:SS') ,-1) from ACTIVITY_LOG Regards,Ajit Kumar
reini
Explorer
0 Kudos

thank you Ajit, that was what i was looking for!