- plottAsked on September 21, 2017 at 02:02 PM
I am trying to add some days (from another field) to a date (from a datepicker) based on this:
However, my example doesn't work.
I'd like calc2 to contain the addition of grunt + calc3
Could you have a look?Page URL:
- JotForm SupportaubreybourkeAnswered on September 21, 2017 at 03:31 PM
Yes its possible. I cloned your form and have it working here:
You were nearly right. But the calculation field needs to look like this:
Note: If you click on a field here in the calculation it changes colour. Brown indicates a String of text. While black indicates a number. So you first add the numbers in brackets and the result is fed to the dateString function, which returns a textual representation of the date.
- plottAnswered on September 21, 2017 at 06:27 PM
OK, I've now added another calculated field to my form (Week #1). From my eye it appears to be identical to Payroll date, but using a hard-coded number rather than a field.
What am I doing wrong?
- JotForm SupportjonathanAnswered on September 21, 2017 at 09:35 PM
I reviewed your form on my browser and I can see the field Week#1 do have the correct calculated value base on the formula.
Can you please confirm this is resolved already? Let us know if still not.
- plottAnswered on September 22, 2017 at 07:07 AM
Yes, I was able to resolve it, but only by adding another field and adding two fields, rather than adding a field and a number. Should I be able to add a date + a number?
Thanks for your help!
- JotForm SupportcandyAnswered on September 22, 2017 at 10:42 AM
I have also cloned your form on my side in order to find another workaround.
I have seen that first, you have to calculate "Week One Off Set" and then, you should calculate the "Week #1" depends on it, so that's why you need to have double fields for this kind of calculation. So, I couldn't find any possible workaround to calculate those values only with a single field.
For detailed information, please check the following guide: https://www.jotform.com/help/443-Mastering-Date-and-Time-Calculation
If you need any assistance, do not hesitate to contact us.