Date showing in Unix format in customized CMDB Tables.
search cancel

Date showing in Unix format in customized CMDB Tables.

book

Article ID: 198928

calendar_today

Updated On:

Products

CA Service Desk Manager CA Service Management - Service Desk Manager

Issue/Introduction

We just added couple of date fields in CMDB tables and enabled it for versioning as well, however the date format visible in front end is in UNIX format instead of MM/DD/YYYY format.  Need to know how to adjust the field to show a readable date format

Environment

CA Service Desk Manager
Release:  All versions.

Resolution

As this is a customized field, one also needs to add the entry in the cmdb_metadata_common.htmpl page. This file contains cmdb metadata information regarding the attributes of configuration item.

Since the entry was not there, it doesn't know what type of field the new custom column is and doesn't convert as the logic to convert the unix time stamp to dateformat is based on the entry in the htmpl. 

Please perform below steps:

  1. Open Web Screen Painter.

  2. Open the file cmdb_metadata_common.htmpl

     3. Update the code entry as mentioned below: 

<PDM_MACRO name=cmdbMetadata  category="General"         common="YES"     attr="zEOL_Date"             dbcolumn="zEOL_Date"   heading="zDate"            standardcivalue=${args.standard_ci.0.zEOL_Date} currentcivalue=${args.zEOL_Date} help="Custom Date field created">

     4. Save and publish the changes.

The category can be as per your choice, depends on where this field needs to be shown in the versioning tab