TRANSFORMER

String date conversion

Use a String date conversion to convert a selected field that is formatted as a string into a date and make adjustments to it using the date calculator.

Creating a String date conversion process

To create a String date conversion process, right click in the Transformer design panel, choose Process -> String date conversion. Connect it to the previous process as described in Processes.

Properties

General

 

Audit

Custom

 

The CorpoTime format is MMM dd, yyyy.

 

It may be necessary to perform calculations on the string to give it a valid format. If you have more than one columns containing the date element, e.g. day, month, and year, you can combine them in a Calculation process, like this:  

${day} + "." + ${month} + "." + ${year}

 

 

Example

We want to load data from a source into a BMP data record target. The dates in the source are stored as text, not in date format. They look e.g. like this: 26.04.2015.

 

There are no dates available in the Date column in BMP data record target configuration because only columns that are stored in date format will appear there. Therefore, we need to convert the dates in the source from text (string) to date before they can be loaded. This can be done by adding a String to date conversion between the source and the target.

 

The Source field is the column where the dates are stored as text, e.g. "datestring". The Target field is an existing or a new column where the converted values will be stored, e.g. "string converted to date". The Date format is the format the date strings are stored in, in this case: "dd.MM.yyyy". (If they had been stored as 04/26/2015, we would have used MM/dd/yyyy.)

 

In this example we leave Adjustment function empty, since we just want to load the dates as they are in the source.

 

Now when we preview the String to date conversion object we see that we now have a new column "string converted to date" that contains the dates in date format. And when we open the BMP data record target configuration the new column is now available in Date column.

 

 

Version 5.1.2.0

This document contains confidential information. Not to be copied by third parties without written authorization.

© Copyright Corporater AS - All rights reserved.