PDA

Click to See Complete Forum and Search --> : [RESOLVED]check for date null value doesn't work. help.


waely
Nov 6th, 2006, 05:53 PM
hi,
I have formula that checks for two date fields and displays the earlier one.
I tried these tow formulas:

if date1 < date2 OR date1 = date2 then date1
else if isnull(date1) then date2
else if isnull(date2) then date1
----------------------------------------------
if date1 < date2 then date1
Else date2
----------------------------------------------
these formulas work if none of the dates is Null.
the data is coming from Stored Proc and when I run it in the analyser I get Null values for some fields.

any suggestions?
thanks

shakti5385
Nov 6th, 2006, 08:56 PM
If you are saving the null value in the database, or if there is null value in the databse then do one more thing in the formula check that if any date in null then then return second date.
Because we are not able to compare the date with the null value, so logic say if one date is null the return second date if necessary, other wise you can reture zero also.

waely
Nov 7th, 2006, 05:17 AM
thanks.
what is the syntax for checking empty date value?

waely


If you are saving the null value in the database, or if there is null value in the databse then do one more thing in the formula check that if any date in null then then return second date.
Because we are not able to compare the date with the null value, so logic say if one date is null the return second date if necessary, other wise you can reture zero also.

shakti5385
Nov 7th, 2006, 06:04 AM
If isnull(date1) then date2
else if isnull(date2) then date1
else if date1 < date2 OR date1 = date2 then date1

waely
Nov 7th, 2006, 07:27 AM
Thanks