Can I get help with the formatting date code for render.moment()
Can I get help with the formatting date code for render.moment()

I am getting an "Invalid date" message when I try to use $.fn.dataTable.render.moment() in a sortable table.
$.fn.dataTable.render.datetime() does not sort correctly.
Code:
$.fn.dataTable.render.moment('MMM dd YYYY hh:mma', 'Do MMM YYYY')
Actual Data looks like this:
Aug 16 2023 12:00AM
Also need the formatting for this style:
2023-08-16 00:00:00.000
Any help would be appreciated!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I think it is very close, its just that the
a
at the end needs to beA
. See the Moment docs here.For the other one,
.SSS
is what you need at the end of the string.Allan