@Adjust bugging me
@Adjust bugging me
(OP)
Hi all,
I have a field 'Date_B'(a time/date field) with the following formula:
@Adjust(Date_A;3;0;0;0;0;0)
It takes the date from Date_A field and increments the year.
I have no compile problems. However when I come to test the form I get the error:
Field:Date_B: incorrect data type for operator or @function: Time/Date expected.
Notes help says to do it like this !!!. The only way I can stop the error is: @Adjust(@Now;3;0;0;0;0;0)
But that's not want I want to do. I simply want the Date_B field to be 3 years ahead of Date_A field.
Any ideas - this is really bugging me now
Thanks,
ian
I have a field 'Date_B'(a time/date field) with the following formula:
@Adjust(Date_A;3;0;0;0;0;0)
It takes the date from Date_A field and increments the year.
I have no compile problems. However when I come to test the form I get the error:
Field:Date_B: incorrect data type for operator or @function: Time/Date expected.
Notes help says to do it like this !!!. The only way I can stop the error is: @Adjust(@Now;3;0;0;0;0;0)
But that's not want I want to do. I simply want the Date_B field to be 3 years ahead of Date_A field.
Any ideas - this is really bugging me now
Thanks,
ian
RE: @Adjust bugging me
It looks like, from your information that Date_A might be a text field. The value taken from it will be text and cannot be used in the @Adjust formula as a date value is expected.
So, make sure Date_A is a time/date field. I would also put @Today as the default value in this field. This way, the formula in Date_B is not working with a null value if Date_A is empty.
If this does not help out please supply information on the field type of Date_A
Good luck!
RE: @Adjust bugging me
Date_A field is Type: Date/Time, editable.
Date_B field is also Date/Time - I have tried computed and editable.
Date_A field is filled in with any date (ie when a test was taken). I want Date_B field to be 3 years ahead (ie when the test is due for re-testing). So if Date_A field was 01/01/2003 Date_B field has to be 01/01/2006.
As soon as I use the function @Adjust(Date_A..... I get the error when testing the form referring to Date_B field. I do not get any compile errors though.
If I use @Adjust(@Now etc no problem - but this means the whole idea fails.
When I checked in Notes Help - it says to do it like this @Adjust(field;....
So what's wrong ?
Thanks,
Ian
RE: @Adjust bugging me
Date_A had null value - so I changed this to @Today - it's just a matter of refreshing fields if I change date in Date_A.
Thanks for you help.
Ian