View unanswered posts | View active topics
It is currently Wed Nov 27, 2024 12:53 pm
|
Page 1 of 1
|
[ 2 posts ] |
|
Author |
Message |
claudio
Joined: Tue Sep 25, 2007 12:03 pm Posts: 1
|
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.
|
Tue Sep 25, 2007 12:26 pm |
|
|
daniela
Joined: Fri Feb 03, 2006 12:23 pm Posts: 199 Location: Brasov, Romania
|
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.
|
Wed Sep 26, 2007 3:25 am |
|
|
|
Page 1 of 1
|
[ 2 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|