In my code I get a TDateTime value as FieldByName('MyField').AsDateTime via FireDAC and assign it to the cell AsDateTime. Looking at it via debugger shows that it looks correct, but in the generated Excel file the date format Excel uses is wrong. Instead of TT.MM.JJJJ as it is the norm on a German system it uses JJJJ-MM-TT, which displays the date completely wrong. There seems to be no way to change the format used. Trying to specify one via .NumberFirmat as 'TT.MM.JJJJ hh:mm' just leads to a failure message when opening the file with Excel.
In my code I get a TDateTime value as FieldByName('MyField').AsDateTime via FireDAC and assign it to the cell AsDateTime. Looking at it via debugger shows that it looks correct, but in the generated Excel file the date format Excel uses is wrong. Instead of TT.MM.JJJJ as it is the norm on a German system it uses JJJJ-MM-TT, which displays the date completely wrong. There seems to be no way to change the format used. Trying to specify one via .NumberFirmat as 'TT.MM.JJJJ hh:mm' just leads to a failure message when opening the file with Excel.