Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

DatePicker date will not add to a database. How do I format datepicker date to make the DB happy?

I want to get rid of the time and rearrange the date to a mm-dd-yyyy format. I thought the code below would work but I need something to replace "value" and I figured it would be a variable that points to the Date column in the database.

var yyyymmdd = value.split(" ")[0].split("-");
return yyyymmdd[1] + "-" + yyyymmdd[2] + "-" +yyyymmdd[0];

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

DatePicker date will not add to a database. How do I format datepicker date to make the DB happy?

Hi Ellen,

The code you have pointed above - correct for "link" in mapping. "value" there is a value from the link. So if you make link from Date type response field to component - this value will process in that way.

Regards.

Return to “Issues”