4 Replies Latest reply on Aug 29, 2012 8:33 AM by schamblee

    Date/Time functions... (feature request?)

    DrewGingery

      Title

      Date/Time functions... (feature request?)

      Post

      any chance Filemaker could implement the datetime arithmatic functions as present in the perl modual Date::Manip ?

      It would be so much better than what we have now. automatically takes leapyears and the like into consideration.

      http://search.cpan.org/~sbeck/Date-Manip-6.32/lib/Date/Manip.pod

       

      I just had to do this to get a date 2 months after another date, is there a simpler way I'm missing?

       

      Set Variable [ $_day; Value:Day ( participants::initial_appointment_date ) ]
      Set Variable [ $_month; Value:Month ( participants::initial_appointment_date ) ]
      Set Variable [ $_year; Value:Year ( participants::initial_appointment_date ) ]
      Set Variable [ $_month; Value:$_month + 2 ]
      If [ $_month > 12 ]
      Set Variable [ $_year; Value:$_year + 1 ]
      Set Variable [ $_month; Value:$_month - 12 ]
      End If
      Set Field [ participants::followup_one_projected_appointment_date; Date ( $_month ; $_day ; $_year ) ]

      ... and I just realized this isn't going to work if the 1st date is like the 31st and the next month has fewer than 31 days Cry