convert string dd/mm/yyyy to date yyyy/mm/dd javascript code example
Example 1: convert date format from yyyy-mm-dd to dd-mm-yyyy using value javascript
date.value.split("-").reverse().join("-"); //"2021-01-17" --> 17-01-2021
Example 2: convert date dd/mm/yyyy to date object js
DateParts = data.split("/");
new Date(+DateParts[2], DateParts[1] - 1, +DateParts[0]).setUTCHours(
0,
0,
0,
0
)