Free Support Forum - aspose.com

Date time format for cells

Hi,
Can not find list of available formats for:
style.setCustom(frorma);
cell.setStyle(style);
Date date = myDate;
cell.setStyle(style)l
cellSetValue(myDate);

For example I want to print in cell: 1/5/1970 13:24

Hi,


Well, you may check and retrieve your desired number formatting’s custom string in Ms Excel manually. For example, your sample custom formatting for value"1/5/1970 13:24" is “m/d/yyyy hh:mm”. You may simply open Ms Excel and write some date value into a cell, then right click on the cell and click “Format Cells…” to open the dialog, now click Date and then Custom option in the list in the Number tag, this will display custom strings for different types of date/time values, you may also adjust them accordingly for your needs.

Moreover, please see the topic and check the table in it for your reference:
http://www.aspose.com/docs/display/cellsjava/Setting+Display+Formats+of+Numbers++and++Dates

Thank you.