Friday, August 13, 2021

OIC - convert string yymmdd to date yyyy-mm-dd

Use Case:

The requirement is to take input string doj field as yymmdd and then convert it to yyyy-mm-dd format to send the date to a database or endpoint.

Input:

Doj : 210914

Output: 2021-09-14


Use the following:

concat(substring(string(cutrent-date()),1,2),substring(doj,1,2),"-",substring(doj,3,2),"-",substring(doj,5,2))



No comments:

Post a Comment

Featured Post

OIC - Restrictions on Using Stage File Action Operations with the File/Attachment Features of the Connectivity Agent

Restrictions on Using Stage File Action Operations with the File/Attachment Features of the Connectivity Agent When configuring the stage fi...