<?
/*
I recently ran into a problem when saving a spreadsheet to a CSV file would change the dates I saw to the spreadsheet's Internal Date Format (just a plain old number). After a lot of searching I found the algorithm needed to calculate the date.
*/
function ExcelToDate ( $inVar ) {
return date ( "m/d/Y" ,(( $inVar - 25569 )* 86400 )- 7200 );
}
$var = 38147.53801 ; // Date ix "Excel"-format
echo ExcelToDate ( $var );
/*
I have found that OpenOffice is a bit different from Excel in the date calculations. OO uses an Internal Date format that is a day earlier. Thus, the function would need to be changed to:
*/
function OOToDate ( $inVar ) {
return date ( "m/d/Y" ,(( $inVar - 25568 )* 86400 )- 7200 );
}
?>
Query2Report : Generating Html, Pdf and Csv Reports from SQL Query Categories : PHP , PHP , HTML , PDF , Excel enhanced date picker with jcript checking for a dynamic date input Categories : PHP , Java Script , Date Time , Calendar , Arrays Open and Close your website in fixed times . Categories : PHP , PHP Classes , Cron , Date Time Local Time clock and Server time usign PHP and JavaScript Categories : PHP , Java Script , Date Time , Beginner Guides This code consists of two parts, the first part is a .html file that uses a form to pass 3 date variables into day_of_week.php3 You input the mm/dd/yyyy of the day then
it prints what day of the week that day falls on. Categories : Date Time , PHP , Complete Programs Functions that will format a date in either long or short format from a string. Categories : Date Time , Strings , PHP Simple graphic clock/watch generation using gd library. Categories : Graphics , Date Time , PHP Simple PHP control CSS Calendar Categories : PHP , HTML and PHP , Calendar , Date Time , CSS Checks Date-Input from HTML-Forms and converts to YYYY-MM-DD Format for MySQL Date-Fields Categories : MySQL , Date Time , PHP , Databases If you want to create select buttons featuring current date this example will show you how... Categories : Date Time , HTML and PHP , PHP Bs_StopWatch is a class to measure time intervals in microseconds.
Categories : PHP , Date Time , PHP Classes A PHP Script that shows how to use FTP to run a shell script, read two local files and update data in a database. Categories : PHP , Filesystem , FTP , Date Time , Databases Creates three SELECT form fields: Month, Day, and Year. You give it a string which will be used to make the name for the three fields, and a number of seconds to use as the default date. If you give it blank for this value, the current date is used. Categories : HTML and PHP , PHP , Date Time table calendar pretty much does what cal(1) does - prints out a calendar.
Categories : Date Time , PHP , Calendar This script obtains the current Universal Time from the National Institute of Standards and Technology of the United States of America. Categories : PHP , Date Time