On Tue, 25 Sep 2007 17:21:26 +0200, "Pieter Wijnen"
<it.isi.llegal.to.send.unsollicited.mail.wijnen.nospam.please@online.replace.with.norway>
wrote:
>Or simplified to
>
>DateDiff("yyyy", [DOB], [DOE]) + (Format([DOE], "mmdd") > Format([DOB],
>"mmdd"))
>
>I love Boolean expressions <g>
That's what I used to use... until someone pointed out that in SQL/Server True
is +1 rather than -1. The IIF is at least platform independent!
John W. Vinson [MVP]
Pieter Wijnen - 25 Sep 2007 23:05 GMT
Didnt' know SQLServer had IIf, Format & DateDiff <g>
the statement will only be valid in VBA anyway
Pieter
> On Tue, 25 Sep 2007 17:21:26 +0200, "Pieter Wijnen"
> <it.isi.llegal.to.send.unsollicited.mail.wijnen.nospam.please@online.replace.with.norway>
[quoted text clipped - 12 lines]
>
> John W. Vinson [MVP]
Pieter Wijnen - 25 Sep 2007 23:09 GMT
and using Abs is always an option <g> - I Still love Boolean math
DateDiff("yyyy", [DOB], [DOE]) - Abs(Format([DOE], "mmdd") > Format([DOB],
"mmdd"))
It doesn't get really tricky 'till you move to Oracle (PL/SQL) That does
really have the concepts TRUE & FALSE
Pieter
> On Tue, 25 Sep 2007 17:21:26 +0200, "Pieter Wijnen"
> <it.isi.llegal.to.send.unsollicited.mail.wijnen.nospam.please@online.replace.with.norway>
[quoted text clipped - 12 lines]
>
> John W. Vinson [MVP]