Re: [PHP] Days between two dates

2001-05-07 Thread Rosen
It really Work !!! Sorry, thath was my syntax error! Thanks very much !! Rosen Marinov ""Boget, Chris"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Sorry, > > it doesn't work !! > > Why do you say that? I just tested it and it worked. > It returned: >

RE: [PHP] Days between two dates

2001-05-07 Thread Boget, Chris
> Sorry, > it doesn't work !! Why do you say that? I just tested it and it worked. It returned: "115.31296296296" "115" being the number of days ".31296296296" is the fraction of the day that is the difference of hours between the two times. mktime() and date( "U" ) return a unix timestamp

Re: [PHP] Days between two dates

2001-05-07 Thread Rosen
Sorry, it doesn't work !! Rosen Marinov ""Boget, Chris"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hi, > > How can I calculate days between two dates ? > > This should work: > > $firstDate = mktime( 0, 0, 0, 1, 12, 2001 ); > $secondDate = date( "U" );

RE: [PHP] Days between two dates

2001-05-07 Thread Boget, Chris
> Hi, > How can I calculate days between two dates ? This should work: $firstDate = mktime( 0, 0, 0, 1, 12, 2001 ); $secondDate = date( "U" ); $daysInBetween = ( $secondDate - $firstDate ) / 86400; Chris