解析

时间:2015-11-18 10:02:54

标签: php excel date format spreadsheet

我有一个Excel文件,显示格式为dd/mm/yyyy hh:mm:ss的日期。当我解析该表并在网页中打印结果时,电子表格excelReader以这种格式显示日期:yyyy-mm-dd hh:mm。在99%的时间里,这不是问题,但在这种情况下,我还需要显示秒数。我试图修改配置文件,但没有改变。

以下是有关该文件的一些信息:

* A class for reading Microsoft Excel Spreadsheets.
*
* Originally developed by Vadim Tkachenko under the name PHPExcelReader.
* (http://sourceforge.net/projects/phpexcelreader)
* Based on the Java version by Andy Khan (http://www.andykhan.com).  Now
* maintained by David Sanders.  Reads only Biff 7 and Biff 8 formats.
*
* @category   Spreadsheet
* @package    Spreadsheet_Excel_Reader
* @author     Vadim Tkachenko <vt@phpapache.com>
* @copyright  1997-2005 The PHP Group
* @license    http://www.php.net/license/3_0.txt  PHP License 3.0
* @version    Release: @package_version@
* @link       http://pear.php.net/package/PackageName
* @see        OLE, Spreadsheet_Excel_Writer
*/

这是一种日期格式:

var $dateFormats = array (
        0xe => "d/m/Y H:i:s",
        0xf => "d-M-Y",
        0x10 => "d-M",
        0x11 => "M-Y",
        0x12 => "h:i a",
        0x13 => "h:i:s a",
        0x14 => "H:i",
        0x15 => "H:i:s",
        0x16 => "d/m/Y",
        0x2d => "i:s",
        0x2e => "H:i:s",
        0x2f => "i:s.S");

0 个答案:

没有答案