Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82361

Formatting ISO-compliant date

$
0
0

Hi guys,

 

For a webservice we're calling we need to supply a datetime value as a String in a very specific ISO-complaint format:

yyyy-MM-dd'T'HH:mm:ss.SSSZ

However, I cannot seem to get this right with the formatDateTime function in Mendix. The user selects a date and time in an inputfield (which is of type DateTime) however the following expresion doesn't work, and causes the dateTimeFormat to revert to it's default

formatDateTime($Entity/dateTime, 'yyyy-MM-dd''T''HH:mm:ss.SSSZ')

 

I've read a topic with the same issue and an answer from Jasper was marked as accepted, however I'm still struggling with this.

This is the part of the webservice we need to send:

"dateTime": "2017-01-05T00:00:00.000Z"

 

Any tips?

Thanks!


Viewing all articles
Browse latest Browse all 82361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>