Example date/time to MySQL and UNIX timestamp conversion
Some people have problems with the conversion from a date posted by a form and into a format for later calculations or just putting the value into a database.
With this class is it possible to convert a date and time field into a (MySQL or UNIX) timestamp. Of course you can extract date and time from a timestamp, too. Before conversting there is a test to check that a date/time is valid.
Try it, insert a date and time and notice both timestamps.
The format for a non english date is: dd-mm-yyyy
URL des Autors: http://www.finalwebsites.com/snippets.php?id=12
URL für Download: http://www.phpclasses.org/browse/package/1917/download/zip.html
und so tut man dann einen timestamp umwandeln: PHP.NET DATE:
$dasneuedatum=date( "d.m.Y",$timestamp_quelle)
versuch:http://tools.webseitenprogrammierer.ch/timestamp/format_timestamp.php?timestamp_quelle=1199530804 gibt Dir das:
Notice: Undefined index: timestamp_quelle in /home/httpd/vhosts/webseitenprogrammierer.ch/subdomains/tools/httpdocs/timestamp/format_timestamp.php on line 78
01.01.1970