What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-07 05:34:02
does not conform to the required format. The format is "yyyy-MM-ddThh:mm" followed by optional ":ss" or ":ss.SSS".
export function toDatetimeLocal(){ const date = new Date(), ten = (i)=> ((i < 10 ? '0' : '') + i ), YYYY = date.getFullYear(), MTH = ten(date.getMonth() + 1), DAY = ten(date.getDate()), HH = ten(date.getHours()), MM... Add solution -
Javascript 2021-09-06 17:51:05
react native get current time
var date = new Date().getDate(); //To get the Current Date var month = new Date().getMonth() + 1; //To get the Current Month var year = new Date().getFullYear(); //To get the Current Year var hours = new Date().getHours(); //To get the Current Hours var m... Add solution -
Javascript 2021-09-06 04:01:02
javascript format date yyyy-mm-dd
var today = new Date(); var dd = String(today.getDate()).padStart(2, '0'); var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0! var yyyy = today.getFullYear(); today = mm + '/' + dd + '/' + yyyy; document.write(today); Add solution