Luxon date formatting from object as moment does

412 Views Asked by At

How can I pass a string object inside a Luxon hours formatting?

var message = "2020-10-05 17:24:23.456354"

Kind of a: {DateTime(message).local().toFormat("HH:mm")}

Which is not working.

In moment.js would be: {moment(message).format("HH:mm")}

1

There are 1 best solutions below

0
On BEST ANSWER

{DateTime.fromISO(message).toFormat("HH:mm")}