Can I do the 'th' Date Formatting in a PHP Server Action?

Here you go @sitestreet:tada:

Add this to your code…

  <!-- https://community.wappler.io/t/how-to-get-date-with-st-nd-or-th-using-formatdate/14686/6 -->
  <script>
    dmx.Formatter('string', 'formatDate2', function(val, format) {
  return moment(val).format(format);
});
  </script>

Then use:

.formatDate2('Do')

How to get date with st nd or th using formatdate

1 Like