You should use mktime()
mktime
(PHP 3, PHP 4 )
mktime -- Get UNIX timestamp for a date
Description
int mktime ( int hour, int minute, int second, int month, int day, int year
[, int is_dst])
www.php.net/mktime
--
Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
www.WorldAKT.com - Hébergement de
Hi everybody,
here is the code which does unfortunatelly not work as I want. The goal is
to produce a unix timestamp which is a date 7 days ago and one 14 days ago
and so on.
code:
switch ($ts){
case 1: // today
$timestamp = mktime (0,0,0,date(m) ,date(d),date(Y));
break;
case 2:
timestamp is an integer.
you can convert it to hex string via sprintf(%x, timestamp) and store it.
so if timestamp is a 32bit integer than it's hexadecimal representation will
take 8 characters.
De Necker Henri [EMAIL PROTECTED] wrote in message
3 matches
Mail list logo