Daily Archives: April 5, 2013
Excel stores a date internally as a number of days since January 1, 1900.For example: "June 9th, 2011 10:30 AM" would be stored as "40703.4375".40703 is the number of full days since 01/01/1900 and 0.4375 represents the time (10.5/24 = 0.4375). When you process dates read from an Excel spreadsheet (e.g. using PHPExcel) you often want to convert them into a UNIX timestamp i.e. a number of seconds elapsed since midnight of January 1, 1970 UTC. Here is a PHP code to do that: Although the code above is written in PHP the function should be very similar in any other language e.g. C# or java. If the provided date is earlier than 1/1/1970 then the minimal timestamp value will be returned. Alternative…
Recent Posts
Categories
- C++ (3)
- Java (18)
- JavaScript (1)
- Machine Learning (8)
- Network (4)
- Others (27)
- PHP (11)
- Python (5)
Tags
AdaBoost
Angular
Bagging
Boosting
C++
C4.5
CART
CDN
Crack
CUDA
Decision Tree
Dimensionality Reduction
Email Template
GBDT
Git
GitHub
GPG
Hadoop
ID3
include
IPv6
Java Virtual Machine
JUnit
JVM
Keyboard
Lua
Machine Learning
NAT
OpenWRT
PHP
process
Random Forest
Random Projection
Raspberry
Raspbian
require
Spring MVC
Squid
Timezone
tmpfs
Ubuntu
Unit Testing
WordPress
XCode
Zend Framework