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.
FormCalc has a "Date2Num()" function to get the number of days since the Epoch date and the "Num2Date()" function to convert the number days since the Epoch date to a date string.
JavaScirpt is more complex and computes dates based on the milliseconds from the Epoch date.
There is more information about the FormCalc date and time functions in the Scripting references provided with LiveCycle Designer.
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:
Have you tried the "formattedValue" and make sure the date string is formatted in the same manner as your parameter srting.
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.
Good Morning GEO
Ok if finally figure out where to insert the code, but for some reason it is giving me a 1900 date in the date 2 field. here is my code, can you tell me what I am doing wrong;
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.