0

I'm developing a Spring boot application frontend and the server is passing to me database record with a value, representing the date, that is EPOCH time so: "yyyy-mm-dd'T'HH:mm:ss.sss'Z'"

I would need to filter only date that are same date of today.

So how can I transform to a standard date format and comparison with date of now?

many thanks

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
giorgio
  • 105
  • 1
  • 8
  • 3
    That's not "epoch time", it's an ISO standard UTC date. You can pass it directly to the JavaScript Date constructor. – Pointy Sep 23 '20 at 22:55
  • 1
    While use of the built–in parser is [generally discouraged](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date#Examples), you've chanced upon the only supported format that is reliably parsed by implementations currently in use, so `new Date(timestamp)` will do. – RobG Sep 23 '20 at 22:59

0 Answers0