CA Service Management

  • 1.  Time Spans in doSelect where clause

    Posted 07-03-2015 11:53 AM

    Hello, I would like to use time spans in my doSelect WS query e.g.

    <soapenv:Envelope xmlns:soapenv="" xmlns:ser="">
             <whereClause>open_date = StartAtTime('PAST_WEEK') AND nb</whereClause>
                <!--1 or more repetitions:-->


    It is sad but each time I get empty results. Nevertheless I would like to get some more information about time spans. As I understand thy are evaluated by some SDM process according to configured schedule. Maybe someone knows where those evaluated values are stored in files, memory or database? Maybe there is some spel method that can be called to get time span values?

  • 2.  Re: Time Spans in doSelect where clause
    Best Answer

    Posted 07-04-2015 02:05 PM

    Hey Gutis,


    I don't know if you can use time spans in the whereClause of a doSelect but if you used "open_date = StartAtTime('PAST_WEEK')" in a Stored Query you would also get an empty result.

    That's because the StartAtTime('timespan-name') returns a particular second (since Epoch) in time. If you wanted a query that resulted in the tickets that had been opened in the particular time span then it would look like:


    open_date > StartAtTime('PAST_WEEK') AND open_date < EndAtTime('PAST_WEEK')



  • 3.  Re: Time Spans in doSelect where clause

    Posted 07-04-2015 06:05 PM

    Thank you for pointing my obvious mistake. It seems that timespans can be used in webservices,

  • 4.  Re: Time Spans in doSelect where clause

    Posted 07-04-2015 06:27 PM

    My pleasure, Gutis. I'm very good at pointing out obvious mistakes (except my own).


    I have learned that you can use timespans that way. Thanks for the feedback.