C
Chris Roche
Hello all,
I am having a problem getting the proper date. What I want
to happen is a date field called [Maintenance] would take
the more recent date of two other fields [MobileDate] and
[DemobDate]. Is there is quick way of doing this, even if
one or the other may be null? I think I may have done it
the roundabout way. I created a field called Recent which
is as follows: Recent: DateDiff("d",[MobileDate],
[DemobDate]), which essentially calculates the difference
between the 2 dates. Then I used Maintenance: IIf([Recent]
not then it takes the [MobileDate]. That all works fine
except when the [DemobDate] is Null, then nothing is input
into [Maintenance]. When [MobileDate] is null it gives the
proper [DemobDate] in [Maintenance]. Like I said I will
take an easier route if there is one. Its just when there
is a null value in DemobDate that a problem occurs.
Thanks for the help,
Chris
I am having a problem getting the proper date. What I want
to happen is a date field called [Maintenance] would take
the more recent date of two other fields [MobileDate] and
[DemobDate]. Is there is quick way of doing this, even if
one or the other may be null? I think I may have done it
the roundabout way. I created a field called Recent which
is as follows: Recent: DateDiff("d",[MobileDate],
[DemobDate]), which essentially calculates the difference
between the 2 dates. Then I used Maintenance: IIf([Recent]
[MobileDate] is positive it takes the [DemobDate], and if0,[MobileDate],[DemobDate])so that if the [DemobDate] -
not then it takes the [MobileDate]. That all works fine
except when the [DemobDate] is Null, then nothing is input
into [Maintenance]. When [MobileDate] is null it gives the
proper [DemobDate] in [Maintenance]. Like I said I will
take an easier route if there is one. Its just when there
is a null value in DemobDate that a problem occurs.
Thanks for the help,
Chris