How do I convert the string 03-MAR-2021
to the string 20210303
with Javascript in Pentaho Spoon
start_date="03-MAR-21";
var new_startDate= new Date(start_date);
var date= moment(new_startDate).format('yyyyMMdd');
start_date="03-MAR-2021";
var date= str2date(start_date, "dd-MMM-yyyy");
var formatedDateString = date2str(date, "yyyyMMdd");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.