xls2csv doesn' t work with excel date format.
When I use xls2csv (part of catdoc package) it can't handle dates. -f
switch is supposed to help, but does not work fine. 25/07/2008 becomes "26/07/12" :( with Quote:
Alain. |
Quote:
The -f will only work properly if you put in the right syntax, and doesn't implement the entire POSIX date/time set. Only a limited subset is supported. Chances are there's a syntax problem in your -f declaration. |
Right syntax ?
Hi,
Code:
-f%d/%m/%y with it, xls2csv adds always 4 years and one day to the date, any idea about that. Thanks for help. Alain. |
xls2csv returns a day count
xls2csv returns a day count. I determined that the corrsponding day count for the epoch (time_t 0) is 25568. That may be polluted by my timezone, but it's a start. I subtract that number from the day count returned by xls2csv. I convert that to seconds (time_t, duh!) and convert it from seconds to something we stupid humans use. The strftime.exe is a c program I've been using on *nix sytems for several years. See the manpage on strftime (time_t, tm structs, localtime, etc). As for getting the -f option in xls2csv to work, I haven't been able to.
PC - ~ >bc -l bc 1.06 Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. 40053 - 25568 14485 14485 * (60*60*24) 1251504000 quit PC - ~ >source/c/strftime.exe 1251504000 2009 08 28 20 00 00 EDT |
All times are GMT -5. The time now is 10:05 PM. |