A
aaronfude
Hi,
In Excel, the date represents the number of days since Jan/1/1990, with
the number 1 representing that date.
May/1/2006 is represented by .
So the following ought to convert that number to a java date:
GregorianCalendar gc = new GregorianCalendar(1900, Calendar.JANUARY,
1);
gc.setTimeInMillis(gc.getTimeInMillis()+ (38838L-1)*24*60*60*1000);
System.out.println(gc.getTime());
But I get
Tue May 02 01:00:00 EDT 2006
Am I doing something wrong or does Excel count days wrong?
Many thanks in advance!
Aaron Fude
In Excel, the date represents the number of days since Jan/1/1990, with
the number 1 representing that date.
May/1/2006 is represented by .
So the following ought to convert that number to a java date:
GregorianCalendar gc = new GregorianCalendar(1900, Calendar.JANUARY,
1);
gc.setTimeInMillis(gc.getTimeInMillis()+ (38838L-1)*24*60*60*1000);
System.out.println(gc.getTime());
But I get
Tue May 02 01:00:00 EDT 2006
Am I doing something wrong or does Excel count days wrong?
Many thanks in advance!
Aaron Fude