Page 1 of 1

Query - Compare date fields

Posted: 26 Jan 2023 00:02
by kevync1985
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).

Re: Query - Compare date fields

Posted: 26 Jan 2023 10:08
by tatewise
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.

Re: Query - Compare date fields

Posted: 26 Jan 2023 22:19
by kevync1985
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