|
|
|
| Title : |
Convert MYSQL timestamp (14) fields back to UNIX epoch (seconds) format for display with the date() function. "revertTimeStamp($timestamp)" |
| Categories : |
PHP, Date Time, MySQL |
 Dan Green |
| Date : |
Nov 27th 1999 |
| Grade : |
4 of 5 (graded 11 times) |
| Viewed : |
23253 |
| File : |
No file for this code example. |
| Images : |
No Images for this code example. |
|
| Search : |
More code by Dan Green |
|
| Action : |
Grade This Code Example
|
|
| Tools : |
My Examples List |
|
|
|
|
|
|
<?
function revertTimeStamp($timestamp)
{
$year=substr($timestamp,0,4);
$month=substr($timestamp,4,2);
$day=substr($timestamp,6,2);
$hour=substr($timestamp,8,2);
$minute=substr($timestamp,10,2);
$second=substr($timestamp,12,2);
$newdate=mktime($hour,$minute,$second,$month,$day,$year);
RETURN ($newdate);
}
?>
|
|
| Finding the day of the week for a specific date.
Categories : PHP, Databases, MySQL, Date Time | | | mysql date/time converters Categories : PHP, MySQL, Databases, Date Time | | | Data Retrieve from Mysql using AJAX with PHP Categories : PHP, AJAX, Date Time, Databases, MySQL | | | Convert date's in YYYY-MM-DD (i.e. mysql format) into PHP3 timestamps. Also Find the difference in days between two PHP3 timestamps. Categories : HTML and PHP, PHP, MySQL, Date Time | | | How to Convert a MySQL Timestamp to a USA Date & Time Categories : PHP, MySQL, Databases, Date Time | | | Phorum, MySQL, Language, UK date format, MySQL UK Date format Categories : PHP, Date Time, Strings, MySQL, Databases | | | List people whose birthdays fall on the current Day and Month
Categories : Databases, Date Time, MySQL, PHP | | | 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 | | | bookmarker - PHP, PHPLIB, MySQL WWW based bookmark manager Categories : MySQL, PHP, MySQL, Complete Programs, Databases | | | 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 | | | Simple conversion functions to change MySQL dates to arrays, arrays to MySQL dates.
Categories : PHP, Arrays, Date Time, Databases, MySQL | | | formating MySQL Timestamp to get a propper Output.
related : Timestamp, ereg_replace, mysql, substr Categories : MySQL, PHP, Date Time, Databases | | | Count how many weeks in the month have a specified day, such as Mon, Tue, etc. Var avail - number of days - first day name of the month, occurrences of Sun, occurrences of Mon, etc. Allows you to calculate number of working hours exclude Holidays. Categories : Calendar, Date Time, PHP, Databases, MySQL | | | How to Insert a Date Format Into MySQL from PHP Categories : PHP, Databases, MySQL, Date Time, Beginner Guides | |
|
|
|