Add Two Days to Date Field

aaronm91043268

05-11-2015

I have two date fields binded through global data. When a date is selected it auto fills to another date field. I would like that second date field to add two days to that date automatically. It would be a read only for the second date field. Is there a way to do this without having to change it to a text field, however, any way to achieve this would be great...I am pretty stumped..

Accepted Solutions (0)

Answers (2)

Answers (2)

Magus069

MVP

09-11-2015

Hi there,

to do this you I suggest you to use the language FormCalc, it can use functions which are easy to use to manipulate dates

Date2Num(date, format) (returns the number of days since 1st January 1900)

and

Num2Date(number, format) (returns a date format)

The date field which you want it to be readOnly will need to have the following FormCalc script within the calculate event

Hope this help!

ianp333321

28-04-2017

Hi Magus069,

I know this is an old post but I've literally gone stir fry trying to figure this out and have spent countless hrs digging the net for this answer and it worked perfectly for me.

Thank you kindly

Ian