PerfectForms Forums » Behaviors

What are the units for the Date Difference function?

(5 posts)
  • Started 3 years ago by rgatson
  • Latest reply from Dennis @ PerfectForms
  1. rgatson
    Member

    The units for the date difference function are as follows:

    y - years
    l - months
    w - weeks
    d - days
    wd - working days
    h - hours
    m - minutes
    s - seconds

    If you have two date fields, or two time fields, you can use the Date Difference function to return the difference based on the value of the units. So, for example, if you had a start and end (time/date), To calculate the difference using the Date Difference function, you would enter the End (date/time) as the first value, the Start (date/time) as the second value, and the corresponding unit in which you wish to calculate the results in.

    Posted 3 years ago #
  2. charlesralston
    Member

    Is there a way to merge the date and time fields together? I need to calculate the difference between a specific start date and time with that of another.

    Example:
    An employee's shift could start on 03/05/2009 06:30:00 PM and end on 03/06/2009 05:30:00 AM

    I need to be able to calculate the # of hours the employee worked, which in this scenario would be 11 hours.

    Charles

    Posted 2 years ago #
  3. rgatson
    Member

    Hi Charles,
    I have a sample form which demonstrates this type of calculation. I'm going to send it to you shortly.

    Ray

    Posted 2 years ago #
  4. evelina.liu
    Member

    I have a question regarding date calculation - how should I calculate whether or not an entered date falls within this current fiscal year (from 9/1 to 8/31).

    So far I have a good structure in arranging my elements for this calculation, but I am unable to figure out how to accomplish "year + 1" or "year - 1". Not sure if there is any related function for this, or if I miss anything.

    Below is my current logic:

    Determine current fiscal year (f_year):
    If month(today) >= 9 then f_year = year(today)
    If month(today) < 9 then f_year = (year(today) - 1)

    Determine if the entered date falls within this current fiscal year:

    Check If ( (month(entered_date) >= 9) & (year(entered_date) = f_year) )
    OR
    ( (month(entered_date) < 9) & (year(entered_date) = (f_year + 1) )

    Thanks.

    Posted 11 months ago #
  5. I have built a sample form to demonstrate the behaviors. I will email it to you.

    Posted 11 months ago #

RSS feed for this topic

Reply

You must log in or register to post.

Contact

1917 Palomar Oaks Way
Suite 160
Carlsbad, CA 92008
866.900.8588

  picture  picture  picture  picture