Luxon date formatting from object as moment does

385 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 answers

0
darkflame On BEST ANSWER

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