current timestamp function for sam queries
From ServiceNow RITM0100299 (Satish Desai)
It would be useful to add a function for use in sam queries similar to the unix_timestamp function in mysql. This would allow the creation of queries like "data_tier artdaq AND online.RunStartTime > (UNIX_TIMESTAMP() - 86400)" which gets all artdaq files for runs starting in the last 24 hours (24hrs*3600 sec/hr = 86400 sec)
After some discussion with Rob Illingworth, I think it would be better to implement a TIME_SINCE function. Then one could add a constraint like "TIME_SINCE(Online.RunStartTime) < 86400'
#1 Updated by Robert Illingworth over 6 years ago
We've discussed this and decided that while it's a reasonable thing to ask for, it is not currently a priority. As part of our migration from Oracle to PostgreSQL we're straightening out the handling of times in the database, and once that is done it should be easier to implement something like this in a consistent manner. For the time being you can use the existing approach at Nova of renaming old definitions and creating a new one with fixed times.