RE: Help with Date

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Is there a way to convert a date " 20/11/2002 " to a Float number in
PHP,
> since the date starts in 30/12/1899, just like the delphi treats the
> dates....

Yeah, of course. To convert "20/11/2002" into a float, just do

echo (float)"20/11/2002";

and you get 20!!

Or you can use strtotime() to convert it to a Unix timestamp (integer,
number of seconds since Jan 1, 1970).

---John Holmes...



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux