Compare 2 dates

Hello all:I need to compare 2 date fields in formula but I failed;

need to say that

@if(supplier_ETD=30/12/1899;“”;supplier_etd)

that’s what I did and I keep getting the value 30/12/1899 what am I missing here

thanks

Dalia

Subject: Compare 2 dates

Try use this

@If(supplier_ETD=@Date(1899;12;30);“”;supplierETD)

Subject: RE: Compare 2 dates

I tried and I got an error:Incorrect data type for operator or @ function time/date expected

thank you for your response

P.s:

if I may ask where are you from

Subject: RE: Compare 2 dates

Is your supplier_ETD is date value.

If it is not you need to convert this value to date first before you can compare 2 dates.

Subject: Compare 2 dates

Try:@If(!@IsTime(supplier_ETD); “”; @Date(supplier_ETD) = [30/12/1899]; “”; supplier_ETD)

Subject: RE: Compare 2 dates

still the same value ,the field is computed and every thing is ok ,still I get the same value in the field in notes client and webany idea why is that

thanks

Dalia

Subject: RE: Compare 2 dates

First, you need to find out exactly what value – and what datatype of value – is in that field. Use the Document Properties dialog from a view to examine the field value.

Rod’s formula looks OK to me – it assumes that dates are formatted dd/mm/yyyy on your computer, but based on your original posting it looks like they are. Are you sure you didn’t leave out the square brackets or anything?

You might try putting in some debugging code so that you can tell which part of the expression is failing. E.g.:

@StatusBar("@IsTime(supplier_ETD) = " + @Text(@IsTime(supplier_ETD)))

Also, you said that it’s a “computed” field. Did you know that computed fields are not recalculated when opening an existing document? Only when you edit the document, and refresh or save it, will Notes display a new value. The debugging code will also help you to determine when the formula is actually being evaluated.