Page 1 of 1

Using Approx Death date in queries

Posted: 13 Aug 2020 09:05
by Gowermick
I am using query to find missing 1939 entries, and am using death date to exclude any who died before 29 Sep 1939.

I know someone died between 1911 and 29 Sep 1939, I tried amending his death to 'Bef 29 Sep 1939' using a date expression, but I cannot seem to exclude him.

I have tried using various expressions along the lines of Exclude if %IND1.DEATH[1]% comes before expression but cannot find correct expression to finish it off.

Any suggestions?

Re: Using Approx Death date in queries

Posted: 13 Aug 2020 09:48
by tatewise
The complication is that whatever variant of Date you use (Simple date, Period, Range) the comparisons are performed against the first specific date. So 29 Sep 1939 is treated the same as before 29 Sep 1939 and if tested as earlier than 29 Sep 1939 both will return false, because the test literally means on or before 28 Sep 1939.

You either need to set the Date to before 28 Sep 1939 which actually means on or before 28 Sep 1939, or you must test for earlier than 30 Sep 1939.

BTW: after 29 Sep 1939 means on or after 29 Sep 1939.

Re: Using Approx Death date in queries

Posted: 13 Aug 2020 13:41
by Gowermick
Miketate,
Thanks, that clears up some mis-understandings I may have had, but having tried both your suggestions, it still doesn't work as it should!
i.e. I changed individuals death to bef 28 Sept 1939, and filter to died before 30 Sept 1939

There is obviously something weird going with FH or my query, as it still lists the indivual who died before 28 Sept 1939. and I also spotted some other people who died after 1939!
e.g.:-
1. Individual, Death = 1981 [Lists Death(Year) as 1981, Death as Died 1981]
2. Individual, Death = 6 Oct 2016 [Shows Death(Year) as 2016, Death as Died 6 October 2016]
3. Individual, Death = before 28 Sep 1939 [Lists Death(Year) as Blank], Death as Died before 28 September 1939

No doubt you'll spot my error, but blowed if I can

Re: Using Approx Death date in queries

Posted: 13 Aug 2020 14:26
by tatewise
Your 4th Rows tab filter is testing %INDI.DEAT[1]% which is a text string describing the death event, date & place and is also indicated by the comparison comes before '30 Sep 1939' in string quotes.

Change it to %INDI.DEAT[1].DATE% with comparison was earlier than 30 Sep 1939 or whatever date you need.

BTW: The :YEAR qualifier only works on simple dates so use =Year(%INDI.DEAT.DATE%) instead.

Re: Using Approx Death date in queries

Posted: 13 Aug 2020 15:10
by Gowermick
Many Thanks.
I hope they simplify the date structures in Version 7. It is currently a minefield with lots of pitfalls to catch the unwary :D

Re: Using Approx Death date in queries

Posted: 13 Aug 2020 15:33
by tatewise
They cannot simplify the fundamental Date structures because they are defined by the GEDCOM specification.
They might fix certain deficiencies in qualifiers and functions that operate on Date fields.

However, your issue was mixing up %INDI.DEAT% death description text with %INDI.DEAT.DATE% death date.

The underlying problem is what is meant by before and after, etc. GEDCOM says:
AFT = Event happened after the given date.
BEF = Event happened before the given date.
BET = Event happened some time between date 1 AND date 2.

But whether those boundary dates are inclusive or exclusive is not clear, but FH seems to have chosen inclusive.
i.e. Event happened on or after/before/between the given date(s).