I have declared a DataTable with a primary key column with System.DateTime type.
I present it in a WinGrid.This is done at runtime so I don't get an oppertunity to set things up nicely via the Grid Designer.
Now and then it is exported to Excel in the simplest possible way.
The Date is now in a very user unfriendly format counting the days since beginning of time (MS time that is)
ddMMyy
I'm using NetAdvantage 2007.2.
If this is bug is it corrected in 2007.3?
Is there a way to better prepare the
You need a hotfix (available for versions 7.2 and 7.3). See also bug report BR27306
Sorry, need more help!
If BR27306 only fixes what it says then I have a new and much worse problem because
I have also tried no format which works fine in the grid (equivalent of short date pattern as stipulated) but Excel 2007 still reports the date as a number (Julian date)
Could it be an I18N problem?
I am running with an English Windows XP, English Office 2007 and a Danish locale i.e. short date pattern is dd-MM-yy
I don't quite understand, where is the problem. We have a German locale (same short date pattern as you), and in our case no extra formatting is done in the grid itself. The data exported to excel looks exactly as described in the bug fix (and this is acceptable for us).
The hot fix enables dates to retain their format after export to Excel.
This must mean that dates are exported as dates even without the fix. But, alas the format is always the short date from the Windows Control panel. This I could live with.
My problem is that dates are not exported as dates. Instead an integer turns up in Excel, the integer is counting the days since Jan 1, 1899.
This is not acceptable (except perhaps to 'Rainman')
I suggest you to first try out the hotfix, and if this doesn't help you can either contact the support or maybe anybody from Infragistics will answer you here
The list of fixes can be found in the Developer Support manager's blog:
BLOGS: Vincent McDonald
To download a hot fix, you can go to your downloads section once you log in:
My Infragistics Keys and Downloads - Download Anything and Everything You Own