apache poi - POI Java Date to Excel seconds difference -


guys.

i'm having trouble when exporting dates java excel cells using apache poi library.

it's marvelous tool , easy understand , use, right giving me headaches!

here's thing: i'm writing application validates certifications using code made out of 2 letters followed 9 digits. last 4 digits made sum of each number representing day, month , year hour, minute , seconds in instant code generation took place. e.g. 03/31/2015 17:30:32 (24 hour format) => 3 + 31 + 2015 + 17 + 30 + 32 = 2128. works fine, code gets generated, workbook gets new line each data, including date of generation. when open workbook see result, generation date cell gets different actual date value , doing math again results in 4 last digits giving different sum, 2126 or 2130 (varies each time code runs).

i google'd , found gotta related how ms excel , java handles date calculation. excel use days since 01/01/1900 , java miliseconds since 01/01/1970.

does know kind of workaround it?

thanks.


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -