Custom Formatting for Date

Hi

I want to format my cells in dd-MMM-yy format.

How can i achieve this?

Thanks

Hi,

Thanks for considering Aspose.

Kindly refer to the following sample code for your requirement:

Workbook workbook = new Workbook();

Worksheet worksheet = workbook.Worksheets[0];

worksheet.Cells["A1"].PutValue(Convert.ToDateTime("11/12/2006"));

worksheet.Cells["A1"].Style.Custom = "dd-MMM-yy";

worksheet.Cells["A2"].PutValue(DateTime.Now);

worksheet.Cells["A2"].Style.Custom = "dd-MMM-yy";

worksheet.AutoFitColumn(0);

workbook.Save("d:\\test\\tstcustomdt.xls");

Thank you.