difference

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sree266
    New Member
    • Jul 2007
    • 12

    difference

    how can i get the difference between two dates in php
    i have used datedifference( ); method,
    but it is coming in points(decimal values) i need in excat days that to in integers..
    plz help
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Originally posted by sree266
    how can i get the difference between two dates in php
    i have used datedifference( ); method,
    but it is coming in points(decimal values) i need in excat days that to in integers..
    plz help
    Hey there sree!

    Check out gregoriantojd()

    kind regards!

    Comment

    • aktar
      New Member
      • Jul 2006
      • 105

      #3
      Hi sree,

      A couple of functions that may be useful to you if datedifference( ) is returning a decimal number close to what you're looking for:

      round() lets you round a decimal number to a specified length, eg 3.21 would become 3

      floor() rounds a float to the lower integer value. Eg, 2.2 would become 2

      ceil() rounds a float to the higher integer value for eg 2.2 would become 3

      Regards

      Comment

      Working...