Re: [PHP] time to seconds

2002-09-24 Thread mhafizm
select time_to_sec('00:12:30) ?? > > From: "adi" <[EMAIL PROTECTED]> > Date: 2002/09/18 Wed PM 04:54:31 CST > To: "PHP-General" <[EMAIL PROTECTED]> > Subject: [PHP] time to seconds > > Hi, I have a table table1, with a column "Duration" time type(ex 00:12:30) > I want to make in PHP a

RE: [PHP] time to seconds

2002-09-18 Thread Warren Daly
if your data is in UNIX TIMESTAMP format: $result = mysql_query("select * from table1;",$db); while ($row = mysql_fetch_array($result)){ // convert seconds from epoch into human date // $data[] = date("Hi",mktime(0,0,$row['duration'],1,1,1970)); } so I guess using mktime to convert DATE into uni