Convert timestamp to Date time in Javascript
Advertisements I have this timestamp 1682604000 need to convert it in this format 2023-04-27T11:23:24.000Z but getting this date 1970-01-20T11:23:24.000Z using this code new Date(timestamp)).toISOString() Any solution Thanks >Solution : The reason you are getting the wrong date is that the timestamp you provided (1682604000) is in seconds, not milliseconds. JavaScript’s Date constructor takes in the… Read More Convert timestamp to Date time in Javascript