You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Excel spreadsheets store dates as the number of days since January 1st, 1900. If a CSV file hasn't been correctly exported then this can manifest itself as a value like '40337'. It would be good to convert this automatically to the correct date.
The text was updated successfully, but these errors were encountered:
In E_Date class use the following:
public static Date parse(String date) throws ParseException {
try {
return DATE_TIME.parse(date).toDate();
} catch (Exception e){
//Ok now lets try it as a day in numbers.
int days = Integer.parseInt(date);
if (days > 60){
days--; //Fix the Excell bug of counting none existing 29 Febuary 1900 as day 60
}
GregorianCalendar calendar = new GregorianCalendar (1900, 0, days, 0 , 0, 0);
return calendar.getTime();
}
}
Excel spreadsheets store dates as the number of days since January 1st, 1900. If a CSV file hasn't been correctly exported then this can manifest itself as a value like '40337'. It would be good to convert this automatically to the correct date.
The text was updated successfully, but these errors were encountered: