FAQ: How Do I Modify The Default Format of the DateTime Value Generated by Sentry

User wants to make use of the Time Stamp generated by Sentry, but doesn't like the default format Sentry uses. This can be done with the Map Attributes and Headers task.

For example, with the Sentry generated DateTime value of '2014-03-12T18:07:22Z', if you want to remove the hyphens and colons you can break up the value and create templates.. then map the templates to a new user attribute

Map to Template: {year}-{month}-{date}T{hour}:{minute}:{second}Z

Map from Template: {year}{month}{date}{hour}{minute}{second}

The result would be: 20140312180722

Here are the steps:

1. Go to Gateway--->Task Policies--->Task Lists and click New

2. Type in a name and a Description That makes sense to you then click Apply

3. click New then select Map Attributes and Headers. Click Next

4. Click Apply then Click New

5. Fill in the following parameters by either selecting when drop/down or typing in the info:

Source Type:     DateTime

Source Name:

Target Type:      User Attribute

Target Name*:   TimeStamp


6. Click New then fill in the following as below:

Source Type: User Attribute

Source Name*: TimeStamp

Target Type: Template

Target Name*: {year}-{month}-{date}T{hour}:{minute}:{second}Z

Click Create


7. Click New and fill in the following:

Source Type: Template

Source Name*: {year}{month}{date}{hour}{minute}{second}

Target Type: User Attribute

Target Name*: TimeStampCustom



Click Create then Apply


8. Finally click Run then go to System Logs to see the result.  Below is an example:FAQ5.PNG

and the log showing the changed format: 




Article is closed for comments.