Reply to topic  [ 2 posts ] 
Italian Date Format 
Author Message

Joined: Tue Sep 25, 2007 12:03 pm
Posts: 1
Reply with quote
Post 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
Profile

Joined: Fri Feb 03, 2006 12:23 pm
Posts: 158
Location: Brasov, Romania
Reply with quote
Post 
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
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.