Saving Date to Oracle DB (TIP) and Advice if there is better solution
Summary:
Content (please ensure you mask any confidential information):
I am doing a POST to DB the form has dates in it. But I noticed that the date format needs to be changed:
I wrote this code to send a format can be saved to the database:
PageModule.prototype.formateDate = function (inputDate) {
var d = new Date(inputDate);
const monthIndex = d.getMonth();
const monthNames = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"];
var result = d.getDate() + "-" + monthNames[monthIndex] + "-" + d.getFullYear()
return result;
};
Is there better way to do it without JS in Visual Builder.
Version (include the version you are using, if applicable):
Tagged:
0