• 1 reply
  • Latest Post - ‏2013-09-09T16:22:08Z by GlennSkinner
71 Posts

Pinned topic Clearquest Date issue (

‏2013-09-05T19:05:32Z |


When running a  SQL query in CQ  we found the following anamoly:

"TODAY" gets converted to {ts '2013-09-06 03:59:59'} in version   as shown below


"TODAY"  gets converted to  {ts '2013-09-05 04:00:00'}  in version as shown below



CQ 2013 ( Version

select distinct T1.dbid, from  MyDefects T1,users T7 where T1.owner = T7.dbid and (T1.dbid <> 0 and (T1.start_time >

{ts '2013-09-06 03:59:59'}))


CQ2011 ( version

select distinct T1.dbid, from  MyDefects  T1,users T7 where T1.owner = T7.dbid and (T1.dbid <> 0 and (T1.start_time >

{ts '2013-09-05 04:00:00'}))


Today should mean today, not Tomorrow - 1 second.  

I want the conversion as in version when I run my query in version

Any help is appreciated.




  • GlennSkinner
    58 Posts

    Re: Clearquest Date issue (



    Could you provide more specific details on what is happening?

    Which Client(s) does this occur?

    Is this an SQL edited query, or a standard query?

    Have you tried recreating the query in


    I tested with using the clearquest for windows client. I created a defect query with a filter of the submit_date equals "TODAY" if I look at the SQL I see the following was generated:
    select distinct T1.dbid,,T1.headline from Defect T1 where T1.dbid <> 0 and ((T1.submit_date >= {ts '2013-09-09 04:00:00'} and T1.submit_date < {ts '2013-09-10 04:00:00'}))

    When run, the query returns defects submitted today as expected.