<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>itlivewire dev blog &#187; excel date</title>
	<atom:link href="http://itlivewire.com/devblog/tag/excel-date/feed/" rel="self" type="application/rss+xml" />
	<link>http://itlivewire.com/devblog</link>
	<description>Just another web development blog...</description>
	<lastBuildDate>Mon, 23 Jan 2012 17:55:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Convert Excel time to Unix time</title>
		<link>http://itlivewire.com/devblog/2009/12/02/convert-excel-time-to-unix-time/</link>
		<comments>http://itlivewire.com/devblog/2009/12/02/convert-excel-time-to-unix-time/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 07:09:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[excel date]]></category>
		<category><![CDATA[excel time]]></category>
		<category><![CDATA[unix date]]></category>
		<category><![CDATA[unix time]]></category>

		<guid isPermaLink="false">http://itlivewire.com/devblog/?p=196</guid>
		<description><![CDATA[When dealing in PHP with imported data from excel spreadsheets , you might encounter that excel dates looks very different. Excel time looks like this 40179 You cannot compare or compute dates in PHP if it looks like that, it should be on unixtime which looks like this 1104537600 Here is a quick function to [...]]]></description>
			<content:encoded><![CDATA[<p>When dealing in PHP with <strong>imported data from excel spreadsheets </strong>, you might encounter that excel dates looks very different. </p>
<p>Excel time looks like this <strong>40179</strong><br />
You cannot compare or compute dates in PHP if it looks like that, it should be on unixtime<br />
which looks like this<strong> 1104537600</strong></p>
<p>Here is a quick function to convert excel date to unixtime date</p>
<pre class="brush: php;">
&lt;?
$DayDifference = 25569; //Day difference between 1 January 1900 to 1 January 1970
$Day2Seconds = 86400;// no. of seconds in a day
$ExcelTime = 30128;//integer value stored in the Excel column
$ExcelTime = substr($ExcelTime,0,5);//trim excel time get only whole 5 digit
$UnixTime = ($ExcelTime - $DayDifference)*$Day2Seconds;
echo $UnixTime;
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://itlivewire.com/devblog/2009/12/02/convert-excel-time-to-unix-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

