* Partial Dates Fact Query
Partial Dates Fact Query
How would I do a fact query to find facts with partial dates, for example only the year entered?
- BillH
- Megastar
- Posts: 2245
- Joined: 31 May 2010 03:40
- Family Historian: V7
- Location: Washington State, USA
Re: Partial Dates Fact Query
If all you have is the year, you could use Add if %FACT.DATE:COMPACT% was on ["DATE"]. Then check that you want to use a parameter and it will prompt for the value.
This will also work for a full date, but not if you just have a day and month or a month and year.
This will also work for a full date, but not if you just have a day and month or a month and year.
- tatewise
- Megastar
- Posts: 28333
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Partial Dates Fact Query
On the Rows tab use a filter such as:
Exclude unless =Day(%FACT.DATE%) is null
That will include every Fact whose Date has no Day of Month defined.
i.e. a partial date with just a Month & Year or just a Year.
Exclude unless =Month(%FACT.DATE%) is null will include only those with just a Year.
However, that will include any Fact without a Date at all, so supplement with:
Exclude if %FACT.DATE% is null
BTW: Using the Exclude ... filters means their order is unimportant, whereas with Add if ... the order matters..
Exclude unless =Day(%FACT.DATE%) is null
That will include every Fact whose Date has no Day of Month defined.
i.e. a partial date with just a Month & Year or just a Year.
Exclude unless =Month(%FACT.DATE%) is null will include only those with just a Year.
However, that will include any Fact without a Date at all, so supplement with:
Exclude if %FACT.DATE% is null
BTW: Using the Exclude ... filters means their order is unimportant, whereas with Add if ... the order matters..
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Partial Dates Fact Query
Thanks to Mike Tate and Bill Henshaw.