Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

yyyy-mm-dd to dd-mm-yyyy in javascript

//yyyy-mm-dd to dd-mm-yyyy
const changeDateFormet=(date)=>{
	const [year, month, day] = date.split('-');
	return [day, month, year].join('-');
}
const newDate = changeDateFormet('2022-09-24')
console.log(newDate)
Source by 1loc.dev #
 
PREVIOUS NEXT
Tagged: #javascript
ADD COMMENT
Topic
Name
3+4 =