I have 2 fields startDate and endDate both have field type of date/time with calendar dropdown. Then i have a text field named RestrictedDays.
Is there anyway that it can take the date of startDate and endDate and tell me how many days in between and have it show up in RestrictdDays?
I found a script yesterday on the forums and cant get anything to work.
Can someone give me step by step of how to do this??
Solved! Go to Solution.
Views
Replies
Total Likes
the basic script (in formcalc) is:
$ = Date2Num(endDate.formattedValue, "DD/MM/YYYY") - Date2Num(startDate.formattedValue,"DD/MM/YYYY") // the DD/MM/YYYY part should be whatever format you have set your date fields to.
You put this script in the calculate field of the textbox. You may want to put in some extra code so you dont see a number until they have entered dates into both start and end date fields.
Views
Replies
Total Likes
If you look at this post I attached a sample that shows an example of a calculation between two dates.
http://forums.adobe.com/message/3262526#3262526
Paul
Views
Replies
Total Likes
Hi Paul:
I dont know if your example would work for me. I am attaching a screen shot to show you the form..
I dont want to use a button to calculate but rather select start and end and then in field RestrictedDays show the total number or days.
Views
Replies
Total Likes
You can use (in formcalc) the Date2Num function to turn your dates into numbers which you can then subtract the end date from the start date to get the number of days in between. You could put that calculation into the restrictedDays field so it will calculate automatically without the need for a button.
thats exactly what i want to do. Now the hard part how??
I dont know how to write that script.. Any idea?
Views
Replies
Total Likes
the basic script (in formcalc) is:
$ = Date2Num(endDate.formattedValue, "DD/MM/YYYY") - Date2Num(startDate.formattedValue,"DD/MM/YYYY") // the DD/MM/YYYY part should be whatever format you have set your date fields to.
You put this script in the calculate field of the textbox. You may want to put in some extra code so you dont see a number until they have entered dates into both start and end date fields.
Views
Replies
Total Likes
Wow thank you so so mcuh... That did it
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies