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