js get datetime format code example Example: js datetime format new Date().toISOString().slice(0, 16).replace("T", " ")