Excel stores dates as serial numbers, representing the number of days past one of two optional starting dates (the default in Windows is 00 Jan 1900, as day one is 1 Jan 1900).
Perl uses the number of seconds past the 'epoch', and the epoch on most systems is 1 Jan 1970.
To translate an Excel serial number to perl time, when the reference dates are the defaults as above, use the following
Code:
print scalar gmtime(($ExcelDate-25569)*86400);
This will display something like [tt]Fri Jul 27 09:39:11 2007[/tt], but may be rearranged by using the list output of [tt]gmtime()[/tt] or [tt]localtime()[/tt])
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.