Expand my Community achievements bar.

Add Two Days to Date Field

Avatar

Level 1

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..

2 Replies

Avatar

Level 10

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!

Avatar

Level 2

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