Excel serial number to date format

Hello RTC, I've been recently working on a small app, in which I have a simple fileDropZone and a table with data set to {{fileDropzone1.parsedValue['0'].Sheet1}} to read imported csv and xlsx files.

The issue that I have is the fact that those excel or csv don't have the same format (in a way that they do not have the same column names, data and datatypes etc...). And the issue is the fact that date types are not well read in retool (for dates I get the serial number format in excel).

I can try and maybe map a function on {{self}} and get a date, however it is not going to be sufficient as the data can be changed (like I said earlier). So I need a way to dynamically change the format or find a way to take exactly the formats of my files

You can see in the first column of the image above, that the mapped function works. however I cannot do such thing as the tables change, hence I cannot really relocate (statically) which columns I should map. Which can be seen in the fact that the second line (2nd and 3rd column) are dates that were read as integers (serial numbers).

How can I manage this issue?

Thank you for your help.

Hi @Emmanuel

Thanks for reaching out!

Are the csvs always formatted the same (and are the excel files always formatted the same)? If so, you might find it easier to have 2 tables. You could have the tables in the same place on the canvas and show each one based on the file type:

Otherwise, you could check the file type in the date settings: