toISOstring javascript method code example Example: js toisostring new Date().toISOString().slice(0, 16).replace('T', ' ') // "2020-11-28 00:40"