1) How do i get the unix timestamp for the current time 2) How do i convert the unix timestamp to display in the form "d.m.y" or in this case "04.30.03"
ty ty ty :p
RTFM format date: http://www.php.net/manual/en/function.date.php get time: http://www.php.net/manual/en/function.time.php
As mentioned above:
in php the timestamp for "now" is:
$unix_timestamp = time()
a date in "01 30 03" format is:
$date = date("d m y", $unix_timestamp); echo $date;
You can store $unix_timestamp in a mysql integer field.
i use this function often 😃
<? function timestamp_to_date($timestamp) { $date = date("d.m.y", $timestamp); return $date; } // to get the current time time(); //<-- that's it ?>