LittleSmudge
Programmer
I have the following clause in a A2k query
WHERE DateAdd("yyyy",18,[DoB]) > (DateAdd("d",1,'30/08/' & Year([EnrolmentDate])))
This works but the DateAdd("d",1,{date}) bit is messy !
What it is doing is
If Learner's DateOfBirth + 18 years ( Their 18th birthday )
is AFTER
the 31st August on the Year of their Course Enrolment
THEN Show Record
ELSE Omit
( Enrolments take place at anytime throughout the year )
If I simply use
('31/08/' & Year([EnrolmentDate]))
It fails to work properly
I'm, in effect, using the DateAdd function to do a type conversion. However, I can't find a way of formatting
'31/August/' & Year([EnrolmentDate]) into a Date without it.
Any ideas - or am I stuck using this fudge ?
G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
WHERE DateAdd("yyyy",18,[DoB]) > (DateAdd("d",1,'30/08/' & Year([EnrolmentDate])))
This works but the DateAdd("d",1,{date}) bit is messy !
What it is doing is
If Learner's DateOfBirth + 18 years ( Their 18th birthday )
is AFTER
the 31st August on the Year of their Course Enrolment
THEN Show Record
ELSE Omit
( Enrolments take place at anytime throughout the year )
If I simply use
('31/08/' & Year([EnrolmentDate]))
It fails to work properly
I'm, in effect, using the DateAdd function to do a type conversion. However, I can't find a way of formatting
'31/August/' & Year([EnrolmentDate]) into a Date without it.
Any ideas - or am I stuck using this fudge ?
G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.