|
|
|
/*
* Author: Matthew Leverton (matthew@aeroinc.net)
*
* string format_db_date(string $db_date, string $format);
*
* usage:
*
* format_db_date($db_date)
* format_db_date($db_date,"d/m/Y")
*
* where $db_date is in the format of "YYYY-MM-DD HH:MM:SS"
*/
function format_db_date($the_date, $format = "n-j-Y")
{
if ( ereg( "([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})", the_date,
$regs) )
{
return date($format, mktime($regs[4],$regs[5],$regs[6],$regs[2],$regs[3],$regs[1]));
}
else
{
return "Invalid date format: $the_date";
}
}
|
|
| Finding the day of the week for a specific date.
Categories : PHP, Databases, MySQL, Date Time | | | Monthly and Daily Upcoming Events calendar. Categories : Date Time, PostgreSQL, PHP, Calendar, Databases | | | Logs hits to any page which includes it. Automatically utilises page access information left behind by PHP/FI2.0. Categories : Databases, PHP, mSQL, Databases | | | mysql date/time converters Categories : PHP, MySQL, Databases, Date Time | | | calculus of the eastersunday Categories : BC math, PHP, Date Time, Databases | | | Phorum, MySQL, Language, UK date format, MySQL UK Date format Categories : PHP, Date Time, Strings, MySQL, Databases | | | Data Retrieve from Mysql using AJAX with PHP Categories : PHP, AJAX, Date Time, Databases, MySQL | | | This program allows you to upload an ODBC ressource - i.e. an MS-Access database to a MySQL server. Categories : Databases, MySQL, Complete Programs, PHP, Databases | | | List people whose birthdays fall on the current Day and Month
Categories : Databases, Date Time, MySQL, PHP | | | In Mysql, the 'datetime' data type is used to store date that looks like '2007-10-16 16:26:30'. we are going to design a function called mysqldate() that takes a mysql date and output format as input and outputs a well formated date. Categories : PHP, Date Time, Databases, MySQL | | | Checks Date-Input from HTML-Forms and converts to YYYY-MM-DD Format for MySQL Date-Fields Categories : MySQL, Date Time, PHP, Databases | | | Simple function to return the number of days in a time span between 2 given dates. Categories : PHP, Date Time, MySQL, Databases | | | 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 | | | Query Timer Categories : PHP, Databases, Date Time | | | Simple conversion functions to change MySQL dates to arrays, arrays to MySQL dates.
Categories : PHP, Arrays, Date Time, Databases, MySQL | |
|
|
|