Incorrect data type

Hi

Is it posiible that this error message:

Incorrect data type for operator or @Function!

comes from this code that is placed in default value!

date:=@Adjust(@Today;0;1;0;0;0;0);

day:=@Day(date);

day:=day-1;

date:=@Adjust(date;0;0;-day;0;0;0);

date

Subject: Incorrect data type

Hello Brane,

try to study @Adjust formula …

here is the format

@Adjust( dateToAdjust ; years ; months ; days ; hours ; minutes ; seconds ; [DST] )

Sample

@Adjust (@Now;0;0;-1;0;0;0)

Regards,

James

Subject: RE: Incorrect data type

I want the formula to set the date on the first of the next month!

Not just one day back!

Thanks

Subject: RE: Incorrect data type

vdate := @Adjust(@Today;0;1;0;0;0;0);vdtext := @Text(vdate);

newvdate := @Word(vdtext;“/”;1) + “/01” + @Word(vdtext;“/”;3);

@TextToTime(newvdate)

Subject: RE: Incorrect data type

It doesnt work!

Thanks anyway!

Subject: RE: Incorrect data type

Works for me…

I just put it in an button…

vdate := @Adjust(@Today;0;1;0;0;0;0);

vdtext := @Text(vdate);

newvdate := @Word(vdtext;“/”;1) + “/01” + @Word(vdtext;“/”;3);

@Prompt([Ok];“display”;newvdate)

and it showed 01/01/2007