How to create calculated field for Custom attribute of Date-Time type

book

Article ID: 37617

calendar_today

Updated On:

Products

CLOUD SERVICE MANAGEMENT SOLUTION CA Cloud Service Management

Issue/Introduction

Summary:

In the database the Date-Time field for custom attribute stores into the unix time stamps format. To convert the unix timestamp value to actual date-time format, please use the following instruction to create the calculated fields into the CSM advance report (jasper report).

 

Instructions:

  • Navigate to Reports >> Advance Reports 
  • Go to the Create Adhoc View from Action Menu and select appropriate source. 
  • Select the “Create Calculated Field” button which is available next to Label “Fields” into the Adhoc View. 

              

<Please see attached file for image>

CAL_1.png

 

  • Update the Field Name and put the below formula to convert the Date-Time type custom attribute and click validate button. 

                 EPOCH_TO_UTC_DATETIME (str2int("<custom attribute name>"))

  • Once the validation shows successful, please save using the “Create Field” button, which can be used in ADHoc view.

Example : 

  • There is Date-Time Custom attribute "estimated_end_date", which is in the unix date time format.  Using the calculated field you can display same attribute in date-time format as shown in below screenshots. 

           

<Please see attached file for image>

CAL_2.png

 

           

<Please see attached file for image>

CAL_3.png

 

 

Environment

Release:
Component: CACSM

Attachments

1558723778586000037617_sktwi1f5rjvs16wzt.png get_app
1558723776611000037617_sktwi1f5rjvs16wzs.png get_app
1558723774500000037617_sktwi1f5rjvs16wzr.png get_app