You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

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):

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!