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

Community Page
Last updated: