Created
September 1, 2020 21:44
-
-
Save rlcc885/51dc63a6e5767582c05a4114e39ee7b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class FormatDate { | |
| private static CellStyle getFormatAsDate(Workbook workbook) { | |
| CreationHelper creationHelper = workbook.getCreationHelper(); | |
| CellStyle cellStyle = workbook.createCellStyle(); | |
| cellStyle.setDataFormat(creationHelper.createDataFormat().getFormat("dddd dd/MM/yyyy hh:mm:ss")); | |
| return cellStyle; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment