Excel Importer - automatic rendering of time field imported as a string

Dear Mendix Community,   Currently I am trying to import an excel file that has two separate Date and Time fields. I am importing and mapping them separately to string attributes. The given format of the Date field in the excel file is: 13-Apr-17. The given format of the Time field in the excel file is: 1/0/1900  4:33:26 PM. The Importer recognizes the Time field as a DateTime apparently and renders it to ‘31-dec-99’ Is there a way to avoid this? Formatting the cells in the excel file doesn’t seem to work. Only the time component is relevant.
1 answers

Hi Pim,

Mendix always saves a datetime attribute as a date and time value. If you only need a date, it still saves it in the database as a 00:00 time. Vice versa it also needs a date, if you only need the time. 

If you only need the time then you can render that on the page typically as a time. If you upload a time value, I suggest to parse the date in the excel importer flow. You can upload the values as strings and then use the parseDateTime(UTC)() functions to create a datetime value you need out of it. You can do this parsing in the import flow already if you need to.

Furthermore especially with times please be aware of timezones if relevant that can also give you different times then you would like to display.