Search
 
SCRIPT & CODE EXAMPLE
 

PHP

excel date format in php

Please use this formula to change from Excel date to Unix date, then you can 
use "gmdate" to get the real date in PHP:

UNIX_DATE = (EXCEL_DATE - 25569) * 86400
  
and to convert from Unix date to Excel date, use this formula:

EXCEL_DATE = 25569 + (UNIX_DATE / 86400)

After putting this formula into a variable, you can get the real date in PHP 
using this example:

$UNIX_DATE = ($EXCEL_DATE - 25569) * 86400;
echo gmdate("d-m-Y H:i:s", $UNIX_DATE);
Comment

excel date format in php

Please use this formula to change from Excel date to Unix date, then you can 
use "gmdate" to get the real date in PHP:

UNIX_DATE = (EXCEL_DATE - 25569) * 86400
  
and to convert from Unix date to Excel date, use this formula:

EXCEL_DATE = 25569 + (UNIX_DATE / 86400)

After putting this formula into a variable, you can get the real date in PHP 
using this example:

$UNIX_DATE = ($EXCEL_DATE - 25569) * 86400;
echo gmdate("d-m-Y H:i:s", $UNIX_DATE);
Comment

PREVIOUS NEXT
Code Example
Php :: php regular expression function 
Php :: @foreac laravel 
Php :: same column in and where laravel query 
Php :: php check if parameter exists in url 
Php :: wp_localize_script 
Php :: laravel run all seeders 
Php :: recursive binary search php 
Php :: upload video in laravel 
Php :: php get char from string position 
Php :: operators in php 
Php :: custom autoload without composer 
Php :: generate unique order id in php 
Php :: has password argon2i 
Php :: php add array to array 
Php :: laravel migrations rename table 
Php :: trait php 
Php :: gettype() function in PHP 
Php :: laravel file store 
Php :: laravel middleware in constructor 
Php :: update column type laravel migration 
Php :: array to string conversion php 
Php :: add top menu bar in wordpress 
Php :: laravel e commerce full project 
Php :: Session/Session.php error codeigniter 3 
Php :: laravel phpdoc collection of model 
Php :: text box should accept only alphanumeric not special characters in php 
Php :: string between two strings 
Php :: how run job laravel in cpanel host 
Php :: get node url from id twig 
Php :: laravel validation required if 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =