How to use date(tod()) function for queries?

We have to do a lot of queries every (late) evening. So I would like to speed it up with favourites.


The first query is to ask for all incidents which came up over the day.


When I save it and move it to the menue "Favourites and Dasboards", the query looked at 17:49:22 like:

Query:"MD000069" and open.time>='16/10/15 00:00:00'


Normalized query:"MD000069" and open.time>=tod() - '17:49:22'


But it is NOT the same like:"MD000069" and open.time>=date(tod())


I do not understand this, because date(tod()) should be the beginning of today.


How will I have to change the query so that I can use it every day?



Second problem:

We would like to find out how much/ which incidents were resolved between yesterday 19:00 and today 19:00 (=07:00 PM)

SM9 generates at 06:02PM:

query:"MD000069" and (resolved.time>='15/10/15 19:00:00' and resolved.time<='16/10/15 19:00:00') Normalized query:"MD000069" and (resolved.time>=tod() - '23:02:23' and resolved.time<=tod() '00:57:37')


I tried to convert it for everydays use"MD000069" and (>=date(tod() - '05:00:00') and<=date(tod() '19:00:00')

but this is totally wrong (Invalid syntax for query.Failed parsing (


How would it be correct?

Where can I find some informations about the parameters of tod() or date(tod())?



HP Service Manager-Client Version 7.11.655 P21

HP Service Manager-Server Release 9.34.4014 Build P4HF6

  • Verified Answer"MD000069" and open.time>=date(tod())

    Means: Show all Tickets from customer MD000069 opened today since 00:00:00


    This works, if nobody changes the data in the background...



 "MD000069" and resolved.time>=date(tod())-'1 00:00:00' '19:00:00' and resolved.time<=date(tod()) '19:00:00'

    Means: Show all Tickets from customer MD000069 which were resolved between yesterday (>=date(tod())-'1 00:00:00) 07:00PM ( '19:00:00') and today (<=date(tod())) 07:00PM ( '19:00:00')


    This works too.


    Maybe it helps somebody else.