Tagged: date difference, units
This topic contains 4 replies, has 0 voices, and was last updated by ehuezo 9 years, 11 months ago.
- AuthorPosts
- December 18, 2008 at 4:25 pm #84
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.
March 5, 2009 at 5:27 pm #4401
AnonymousIs 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
March 5, 2009 at 6:33 pm #4402Hi Charles,
I have a sample form which demonstrates this type of calculation. I’m going to send it to you shortly.
Ray
March 1, 2011 at 9:02 am #5613I 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.
March 1, 2011 at 10:57 pm #5616I have built a sample form to demonstrate the behaviors. I will email it to you.
- AuthorPosts
You must be logged in to reply to this topic.