startDate.toISOString().slice(0, 19).replace('T', ' ') code example Example: get iso date javascript var isoDate = new Date().toISOString()