IdentityNow Transforms - Date Format

IdentityNow Transforms - Date Format

Overview

The date format transform allows you to easily convert datetime strings from one format to another. This often comes in handy when syncing data from one system to another, where each application uses a different format for date and time data.

This transform leverages the Java SimpleDateFormat syntax; more information on this standard can be found in the References section below.

Other Considerations

  • In addition to explicit SimpleDateFormat syntax, the date format transform also recognizes several built-in "named" constructs:

    • ISO8601: A date format corresponding to the ISO8601 standard. The exact format is expressed as yyyy-MM-dd'T'HH:mm:ss.SSSX.
    • LDAP: The date format corresponding to the LDAP date format standard, also expressed as yyyyMMddHHmmss.Z.
    • PEOPLE_SOFT: The date format format used by People Soft, also expressed as MM/dd/yyyy.
    • EPOCH_TIME_JAVA: Indicates the incoming date value is the elapsed time in milliseconds from midnight, January 1st, 1970.
    • EPOCH_TIME_WIN32: Indicates the incoming date value is the elapsed time in 100-nanosecond intervals from midnight, January 1st, 1601.

 

Transform Structure

The date format transform takes whatever value is provided as the input, parses it based on the inputFormat provided, and then re-formats the datetime into the desired outputFormat:

Example

{
  "attributes": {
    "inputFormat": "EPOCH_TIME_JAVA",
    "outputFormat": "ISO8601"
  },
  "type": "dateFormat",
  "name": "Test Date Format Transform"
}

Attributes

  • Required Attributes

    • type - This must always be set to dateFormat
    • name - This is a required attribute for all transforms, and represents the name of the transform as it will appear in the UI's dropdowns
  • Optional Attributes

    • requiresPeriodicRefresh - A true or false value that indicates whether the transform logic should be re-evaluated every evening as part of the identity refresh process.
    • inputFormat - A string value indicating either the explicit SimpleDateFormat or the built-in named format that the data is coming in as

      • If no inputFormat is provided, the transform assumes that it is in ISO8601 format
    • outputFormat - A string value indicating either the explicit SimpleDateFormat or the built-in named format that the data should be formatted into

      • If no outputFormat is provided, the transform assumes that it is in ISO8601 format
    • input - This is an optional attribute that can explicitly define the input data which will be fed into the transform logic. If input is not provided, the transform will take its input from the source and attribute combination configured via the UI.

 

Examples

Example 1

Input: 144642632190

Output: 1974-08-02T02:30:32.190-00

{
  "attributes": {
    "inputFormat": "EPOCH_TIME_JAVA",
    "outputFormat": "ISO8601"
  },
  "type": "dateFormat",
  "name": "Test Date Format Transform"
}

This transform will take the incoming Java epoch-based timestamp and format it as an ISO8601 compatible string.

Example 2

Input: 4/1/1975

Output: 1975-04-01

{
  "attributes": {
    "inputFormat": "M/d/yyyy",
    "outputFormat": "yyyy-MM-dd"
  },
  "type": "dateFormat",
  "name": "Test Date Format Transform"
}

This transform will take the incoming date, which is formatted as a common US date string, and format it to match the date structure of most database systems.

 

References

Comments

There is a bug in the code where if input format is ISO8601 output doesn't give anything. You need to parse ISO8601 input into 

yyyy-MM-dd'T'HH:mm:ss. I found this flaw when I was doing dateMath and after I needed to transform result into another time format.

Hi,

 

I want to create a transform such that the endDate attribute for a user is generated based on the startDate.

 

Example endDate= startDate + 90 days. 

 

Can someone please help me with this?

 

 

Thanks,

Arnav

@arnavaid11 You will probably want to check the date math transform for this solution...

fantastic, I couldn't seem to use "Search" with our wonky date formats

transformed them using your example number two... problem solved.

My LDAP give dates in the following format 20171206142205.783029Z

I am going to try and see if it handles microseconds.

Oh well it didn't handle the LDAP format on the input.  I think that is broken.

Version history
Revision #:
3 of 3
Last update:
‎Dec 09, 2021 03:46 PM
Updated by:
 
Contributors