Formatting mySQL DATETIME field to m/d/yyyy am or pm

Having an issue formatting a datetime date.

Database field input(DATETIME): 2017-12-16 14:37:23

Wappler formatting:
RegDate.formatDate(RegDate.formatDate("M-d-yyyy h:mm a"))

All am times output is OK, All pm times I get this(numbers after the p)…
pm output: 1-4-2018 12:22 p22
am output: 1-4-2018 12:00 am

Thanks,
Amedeo

Hi,
What date format mask are you using?

"M-d-yyyy h:mm a&quot

Hi Teodor, thanks for quick reply!

Teodor,

I resolved the issue, don’t know if I clicked on the date twice or what, but I had reformat twice in the same line: RegDate.formatDate(RegDate.formatDate(“M-d-yyyy h:mm a”))

Manually changed to this and displaying correctly now:
RegDate.formatDate(“M-d-yyyy h:mm a”)