CA Service Management

  • 1.  CABI 6.2 and ITAM 14.3 Date parameter query

    Posted Jul 05, 2017 06:06 PM

    I am trying to query assets based on creation date/last update date and no success.

     

    last update date is stored as integer as per ITAM Schema

    where Jasper functions DateRange or TimestampRange can't be converted to Integer

     

     

    -----------------------------------------------------------------------------------

    net.sf.jasperreports.types.date.DateRange (Date only)
    net.sf.jasperreports.types.date.TimestampRange (Date and Time)

    ------------------------------------------------------------------------------------------

     

    Here is the SQL Query and Error while trying to create a report based on Last Modified date.

     

     

     

    Does anyone tried creating report for Assets based on Date fields as Input parameters?

     

    Thanks,

    Samba.



  • 2.  Re: CABI 6.2 and ITAM 14.3 Date parameter query

    Posted Jul 07, 2017 04:03 PM

    Hi Samba,

     

    Please be aware that the last_update_date, creation_date, etc. are stored in epoch date format  (these are integer datatype), and not stored as date or datetime. 

     

    Convert your compare dates to epoch format and use them in a GT/GE and LT/LE comparison. 

     

    Best Regards,

    Gale Bacon

    CA Technologies



  • 3.  Re: CABI 6.2 and ITAM 14.3 Date parameter query

    Posted Jul 11, 2017 10:11 AM

    Hi Gale,

     

    I already converted the EPOCH format to Date or Date/Time, still it is same problem.

     

    Thanks,

    Samba.



  • 4.  Re: CABI 6.2 and ITAM 14.3 Date parameter query

    Posted Jul 11, 2017 04:21 PM

    Hi Samba,  

    There is no need to convert epoch to date or date/time.  Use the epoch integer field for your comparison. 



  • 5.  Re: CABI 6.2 and ITAM 14.3 Date parameter query

    Posted Jul 11, 2017 05:24 PM

    Hi Gale,

     

    How do you do comparison without conversion? atleast Jasper should convert Date/Time (selected in frontend) to Epoch format. It needs conversion one or other way.

     

     

     

    Thanks,

    Samba.



  • 6.  Re: CABI 6.2 and ITAM 14.3 Date parameter query

    Posted Jul 11, 2017 05:26 PM

    This is achieved using the Between parameter in SQL and Jasper parameters (in table and Main report) as SQL.Date/SQL.Time. Now we can pass the Date/time selected in frontend to SQL db.



  • 7.  Re: CABI 6.2 and ITAM 14.3 Date parameter query

    Posted Jul 12, 2017 04:48 PM

    Hi Samba,

     

    I did a quick search for 'JasperSoft epoch date comparison' and received a few hits. 

    This one looks promising: 

    Greater than or equal to operators for date comparison in Jaspersoft Studio | Jaspersoft Community