Good day and thanks in advance for your help. I am new to Adobe users forums as of Yesterday 6-24-08. I am also new to the designing of these forms but I think I am going to like it. My question is: Can I calculate the difference between 2 dates and get a results of make the finish date be 30 days later than the original date.
Example in excel, for instance: Cells A1 & B1 are dates fields and in A1 I use todays date 6/25/08 and in B1 put this coded =A1+29 then B1 results will be show the date of 7/24/08 which is 30 days out.
Thank you so very much for your immediate response. I have seem some example in the forum, but I can't seem to get it to work. I think I have placed them in the right place on the form here is what I have done thus far:
I am putting the code in the validation script message I was just checking the date string on the binding tab to make sure they were the same. I don't see that pattern in the drop down box, so I just typed it and it stayed in place. I am using the date/time pick calendar, does that make a difference why it might not be working?
The code should be in the Calculation event for the B1 field. You really need to use the "formattedValue" as picture in the display field option since there are too many data entry variations for dates.
Sorry I am so confusing, this is not in excel, the form is created in adobe designer 7.0 and I will try formatedValue as soon and I can research it and see what's is all about. Thanks for all your help, I will keep you informed when I resolved this issue.
I have tried formatedValue and rawValue and neither of them work, Please tell me what is wrong. It give me a date of 1/29/1900,in the Date2 field, when I select the current date from a calendar when I use the below code:
Thanks to all, I finally got it figure out. It took me a moment to understand what I was doing, but I am one of those folks, that will never take no as a final answer. The code for date/time from a calendar do just what I wanted it to do. Count 30 days from the beginning date to the end date.
I am trying to do what u are doing. I want my second date to automatically generate in the Date2 field 90 days after Date1. what do i have to do. im stuck. i keep on getting 1900 date just like you did by using the code above. im no programmer and very new to formcalc. what code did u use to get the job done. please please help!!!!
It sounds like you are not getting the correct number of days from the "Date2Num()" function. You must use the "formattedValue" for the required date string parameter and provide the optional format string with the correct picture format for the field value being passed to the "Date2Num()" function. If you do not the function returns 0.
Hi I have 2 date fields and a total field. I want the Total field to calculate the number of days between the dates but make sure it takes th efirst date as one day. i figured out the formula to get that to work, BUT I dont want the 1 to show on the form before the start date is selected. Can you help?
There is a lot that has to be correct for converting a date string to the number of days. Most importantly one has to have the correct date format for the date string being converted. If it is not the correct string one will receive a zero return or the number of day could be off by 28 or more days off depending on the month and date of the month transposition.
The example also goes over the ISO date and shows what happens when not all of the ISO date is provided.
Sorry, I just got more confused, I'm not great with this. Is there another way I should be doing this? I have a StartDate feild and a EndDate feild. I want the other feild (Total Days) to equal the number of days between the 2 dates. But If 8/8/2008 and 8/8/2008 are choosen for both dates I want the TotalDays to equal 1. Right now I have the below in there and it is calculating right now correctly, but question is will it later useing other dates? Thanks for all yoor help, Lucy