Forum Discussion

jasmeenkaur27's avatar
jasmeenkaur27
Contributor
7 years ago

Date is written in wrong format in excel.

I am trying to write in excel using excel.application. the date extracted via query is 10/08/1989 but the value that is getting printed in excel is 08/10/1989.

 

I have not changed any formatting of the excel using code.

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    My guess is that the Windows environment in which you're pulling up the Excel sheet is set for a date format of DD/MM/YYYY.  So, even though the source data is MM/DD/YYYY, when you write out to Excel, it's going to use whatever the Windows format is to display the date.