Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
on 02-07-2017 10:46 AM - edited on 12-21-2018 05:01 PM by Nina.Wolinsky
I want to report the event time in an email template using the international standard time format. How can I do this?
Use the following Apache Velocity template to convert the time into the format you need.
If using html body:
#set( $String = '' ) $String.format('%1$tY-%1$tm-%1$tdT%1$tH:%1$tM:%1$tS%Tp ',
$latestEvent.eventTime)
If using text body:
#set( $String = '' )## $String.format('%1$tY-%1$tm-%1$tdT%1$tH:%1$tM:%1$tS%Tp ',
$latestEvent.eventTime)
Sample output:
2017-02-07T13:14:02PM
Let us say you do not need AM/PM at the end of the date, the format is:
#set( $String = '' ) $String.format('%1$tY-%1$tm-%1$tdT%1$tH:%1$tM:%1$tS ',
$latestEvent.eventTime)
Sample output:
2017-02-07T13:23:06
Resources: http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#dt
Currently it is not possible to convert from one timezone to another, for example from PST to UTC.
How to convert for slack?
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form