EasyXLS http://forum.easyxls.com/ |
|
Italian Date Format http://forum.easyxls.com/viewtopic.php?f=5&t=112 |
Page 1 of 1 |
Author: | claudio [ Tue Sep 25, 2007 12:26 pm ] |
Post subject: | Italian Date Format |
[u][b][size=18]Sorry 4 my bad english...[/[/size]b][/u] I'm evaluating this product, so a try to export into a XLS a dataset. I have a little problem with date and integer After some test I have into xls filer 1 or 'nothing' where the field's date is null or not. I just try to truncate dd/mm/yyyy in SQL cursor: select CAST(DAY(aDtField) AS varchar) + '/' + CAST(MONTH(aDtField) AS varchar) + '/' + CAST(YEAR(aDtField) AS varchar) AS 'aDate' but in the xls file i find only date wich month's value AND day's values are minor of 12... so I just try to invert Days and Months in the SQL ...so into the XLS file i found the right date...but in the 'mm/dd/yyyy' rappresentation. I must use Italian Rappresentation 'dd/mm/yyyy'. How? I hope is possible but, reading the API, i read: <- src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /> public const System.String FORMAT_DATE_TIME "MM/dd/yyyy HH:mm:ss" <- src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /> Thanks in Advantage. Claudio. |
Author: | daniela [ Wed Sep 26, 2007 3:25 am ] |
Post subject: | |
You must set the number format for the cell. For this you either set the number format for the cell style: ExcelStyle.setFormat("dd/MM/yyyy") or directly to the cell: ExcelCell.setFormat("dd/MM/yyyy") See Tutorial2 for a sample. |
Page 1 of 1 | All times are UTC - 4 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |