Date Formatted ddMMyyyy

Hi,

When I format a date to dd-MM-yyyy I get 31-03-2020 in my text input.
<input name="TIMESTAMP" dmx-bind:value="var1.datetime.formatDate(&quot;dd-MM-yyyy&quot;)">
image

However, when I try ddMMyyy without the hyphen I just get ddMMyyyy entered.
<input name="TIMESTAMP" dmx-bind:value="var1.datetime.formatDate(&quot;ddMMyyyy&quot;)">
image

Is this a limitation of the date format function or am I doing in incorrectly?

Thanks,
Ray.

Hi Ray,
Is it working with spaces, like dd MM yyyy?

Also, are there any errors in the browser console when you use ddMMyyy?

Hi @Teodor, yes it works with spaces. I have just checked and no errors when formatted ddMMyyyy.

Ok, thanks - we’re going to check this :slight_smile:

OK thanks.

Trying to do integration with Global Payments(Realex) and they require a timestamp formatted ddmmyyyyhhmmss.

Thanks,
Ray.

Hi Ray,

Did a bit of testing and it indeed didn’t work with ddMMyyyy. So I directly checked the formatter and fixed it, here is the updated version. Now you can use ddMMyyyyHHmmss which should be what you require.

dmxFormatter.zip (7.6 KB)

I have updated Wappler with the updated dmxFormatter.js and can now confirm getting format as required.

Thanks,
Ray.