* Query - Compare date fields

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
avatar
kevync1985
Platinum
Posts: 40
Joined: 22 Jan 2023 02:44
Family Historian: V7
Location: Winston Salem, NC
Contact:

Query - Compare date fields

Post by kevync1985 » 26 Jan 2023 00:02

Sorry I am new to FH and group. I did not see a specific area for Queries. I am familiar with queries for SQL / MySql / SQlite.
My Question is where I can find examples of how to compare two date fields. Like if %INDI.BURI[1].DATE% <= %INDI.DEAT[1].DATE%. I would use this to filter rows. I would have some other filters but essentially I would want to find burials that had "1872" and Death of July 12th 1872 or any burial that was less than or equal Death (where both had at least year of course).

User avatar
tatewise
Megastar
Posts: 27086
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Query - Compare date fields

Post by tatewise » 26 Jan 2023 10:08

Welcome to the FHUG Kevyn.

To answer your question, the expressions used in Queries are also used in many other contexts in FH, so once you understand how expressions are constructed they can be used for many purposes.
Expressions are composed of Data References such as %INDI.BURI[1].DATE% and Functions such as =IsTrue(...).
They can be combined with Operators such as =IsTrue( %INDI.BURI[1].DATE% <= %INDI.DEAT[1].DATE% )

See the following FHUG Knowledge Base advice and FH Help pages for further details and examples...
An Overview of Queries and associated FH Help pages.
Understanding Expressions and associated FH Help pages.
Operators FH Help page.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
kevync1985
Platinum
Posts: 40
Joined: 22 Jan 2023 02:44
Family Historian: V7
Location: Winston Salem, NC
Contact:

Re: Query - Compare date fields

Post by kevync1985 » 26 Jan 2023 22:19

Hi Mike

Thanks for the links -- ISTRUE was basically what I was looking for. I figure there was a way to do what I was looking for.
I will further review the links you have provided.

Kevin

Post Reply