Quantcast
Channel: Java Programming Forum - Learn Java Programming - Apache POI
Viewing all articles
Browse latest Browse all 120

getDateCellValue() sometimes misses year

$
0
0
I am using getDateCellValue() like this:

Code:

cell = row.getCell( EXCEL_COLUMN_BUCKET_END );
forecastLine.setBucketEnd( cell == null ? null : cell.getDateCellValue() );

On two of the sheets (separate files) everything is fine, but on one sheet, all the years are missing. I can't see any difference in the way the dates are formatted (m/d/yyyy). I've tried different formats on the Excel sheet but nothing changes. Any ideas?

Viewing all articles
Browse latest Browse all 120

Trending Articles