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

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...