Calculate duration between two dates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • archulu
    New Member
    • Mar 2007
    • 34

    Calculate duration between two dates

    hai
    this is archulu. i am new to domapi.now my problem is in my project i am taken 2 domapi datepickers. i want to Calculate duration between two dates which i am selected in that datepicker.

    ex: two dates are selected from domapi are 29-04-2007 01-05-2007
    i want result is duration between is 3days.i want result plz help to me



    note : i am writing this program in perll with unix.
  • KevinADC
    Recognized Expert Specialist
    • Jan 2007
    • 4092

    #2
    what have you tried so far?

    Comment

    • archulu
      New Member
      • Mar 2007
      • 34

      #3
      Originally posted by KevinADC
      what have you tried so far?
      thanks to respond Mr.Kevin

      i am doing leaveform project in perl. in my project i am select two dates(fom date, upto date) from domapi datepicker2. now ihave problem to caluculate duraton between two dates.

      i am trying by using of "Delta_Days " function to caluculate it but no use.
      its giving error as invali date. but my date format was correct. i dont know what happen to my progrme
      plz help to me
      again thank to reply

      Comment

      • KevinADC
        Recognized Expert Specialist
        • Jan 2007
        • 4092

        #4
        If you are trying to use Date::Calc:

        $Dd = Delta_Days($yea r1,$month1,$day 1, $year2,$month2, $day2);

        has to be year-month-day format

        Comment

        Working...