Free Support Forum - aspose.com

Using the style.custom method to set custom date format

Hi,
I am using the style.custom() method to set the date to say - “dd-mmm-yy” format. But for some reason the code picks up my system settings and sets the output date to mm/dd/yyyy (the standard format, cause i am in the US).

Is there something else i need to change/set to make the date output behave the way i want it to ?

regards,
Jaideep.



Hi Jaideep,

Do you mean that the created file does format the cell in "dd-mmm-yy" format but MS Excel shows it in mm/dd/yyyy format? Could you post your sample file here? And are you using our Java product or .Net product?

Hi Laurence,
Thanks for the quick reply.
We are using the .net version. My code simply sets the style.custom to “dd-mmm-yy” to be produced in the excel output, but it still comes out as the default.

regards,
Jaideep.

Hi Jaideep,

Could you post your sample code with excel file to show the problem.

Thank you.