[CSVUtil] Format DateTime Output

Forge Component
Published on 2017-10-09 by Wei Zhu
21 votes
Published on 2017-10-09 by Wei Zhu

How to format a Date or a DateTime field on generated CSV? My DateTime fields are generated as mm/dd/yyyy HH:mm:ss AM/PM


Although it has been a long few months since your post, maybe my answer can still be useful, although I have not tried myself:

If you are having problems with the output format of Date and DateTime data type fields, why don't you try to pre-format yourself those Date and/or DateTime fields into a text field BEFORE your convert the list to CSV?

So, instead of having a structure like { Date (date data type), DateTime (datetime data type) } you would have a structure like { Date_AsText (text data type), DateTime_AsText (text data type) }.

Hope this is helpful.

Tiago Bernardo