Convert a String data type to a Date/Time
type with a specific format.
Procedure
In the readings_output structure, click the
Timestamp element and select
Date/Time in the Data Type
field. Do this for every occurrence of the Timestamp
element in the structure.
Save the structure and open readings_map.
Select the three Timestamp elements, right-click them
and click Remove Expressions (Mappings).
In the Functions tab of the left panel, select the
ParseDateTime function and drag and drop it on one of
the Timestamp elements in the output structure.
Select the Timestamp
element in the input structure and drag and drop it on the Value argument under the ParseDateTime function.
Double-click the ParseDateTime function to open its
properties and enter the pattern for your date, M/D/Y h:m a
for example, then click OK.
Example
Right-click the ParseDateTime function and click
Copy, then paste it in the
Value tab of the other two
Timestamp elements in the output structure.
Press Ctrl + S to save the
map.
Results
Your map is now configured to convert strings into meaningful data types.
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!