* Last Updated Query
- Gary Carson
- Famous
- Posts: 162
- Joined: 02 Mar 2016 17:46
- Family Historian: V7
- Location: Grand Island, Nebraska, USA
Last Updated Query
I have a query with the filter Add if =LastUpdated(%INDI%) is greater than ["Date"].
If I enter a Date in the parameter using the Date Entry Assistant of 1 May 2021 it changes the format to May 1, 2021 and I get an error message that the date is not recognized and the query will not execute. The only date format it recognoizes is a four digit year only.
If I eliminate the Date parameter and manually enter a date using the Date Entry Assistant the value is displayed as 1 MAY 2021 and query executes.
What am I doing wrong when trying to set up a Date parameter
If I enter a Date in the parameter using the Date Entry Assistant of 1 May 2021 it changes the format to May 1, 2021 and I get an error message that the date is not recognized and the query will not execute. The only date format it recognoizes is a four digit year only.
If I eliminate the Date parameter and manually enter a date using the Date Entry Assistant the value is displayed as 1 MAY 2021 and query executes.
What am I doing wrong when trying to set up a Date parameter
Gary
Win 10, FH 7.0.15
Win 10, FH 7.0.15
- Gary Carson
- Famous
- Posts: 162
- Joined: 02 Mar 2016 17:46
- Family Historian: V7
- Location: Grand Island, Nebraska, USA
Re: Last Updated Query
Follow-up. If I change program Preferences > Standard Date from mmm dd, yyyy to dd mmm yyyy the parameter works.
Gary
Win 10, FH 7.0.15
Win 10, FH 7.0.15
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Last Updated Query
You need to use the =Date() type-specifier function, otherwise the Query does not know that ["Date"] is actually a date and not some other type of data. (I know in that syntax it can't be anything else but it often needs to be told.)
e.g.
Add if =LastUpdated(%INDI%) is greater than =Date(["Date"]).
That should let you enter the date in any recognisable format.
The same can apply in other scenarios where =Indiviudal() or =Number(), etc, may be needed. See Type-Specifier Functions.
e.g.
Add if =LastUpdated(%INDI%) is greater than =Date(["Date"]).
That should let you enter the date in any recognisable format.
The same can apply in other scenarios where =Indiviudal() or =Number(), etc, may be needed. See Type-Specifier Functions.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- Gary Carson
- Famous
- Posts: 162
- Joined: 02 Mar 2016 17:46
- Family Historian: V7
- Location: Grand Island, Nebraska, USA
Re: Last Updated Query
I entered =Date(["Date"]) in Value and set parameter to Date but could not make the query work.
Gary
Win 10, FH 7.0.15
Win 10, FH 7.0.15
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Last Updated Query
Sorry Gary, it was getting late last night and I was not thinking straight.
What I suggested is not valid.
It is beginning to look like a bug in FH when mmm dd, yyyy is the preferred format.
I can repeat the symptoms in FH v7.0 and also in FH v6.2 so it is a longstanding problem.
Please report it to Calico Pie via http://www.calico-pie.com/osticket/open.php as usual.
What I suggested is not valid.
It is beginning to look like a bug in FH when mmm dd, yyyy is the preferred format.
I can repeat the symptoms in FH v7.0 and also in FH v6.2 so it is a longstanding problem.
Please report it to Calico Pie via http://www.calico-pie.com/osticket/open.php as usual.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
victor
- Superstar
- Posts: 262
- Joined: 08 Jan 2004 16:53
- Family Historian: V7
- Location: Thatcham, Berkshire, England
Re: Last Updated Query
I have never had a problem with dates. Mine always come as say 1 May 2021. I think it comes down to how you set up FH under some kind of options and you chose how you like the dates to appear as default. So if you select May 1 2021 that is how it appears. so if you type 1 May 2021 it won't be recognised.
Victor
Victor
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Last Updated Query
Victor, Gary and I are entering the Date via the Date Entry Assistant so they are vetted as valid by FH.
However, if Tools > Preferences > General tab has Preferred Standard Date Format set to mmm dd, yyyy then it is impossible to enter an acceptable date and FH always produce an error message. Try it yourself with that setting.
We are not entering 1 May 2021 but are entering May 1, 2021 and that is what FH complains about.
The Query filter should work regardless of the Preferred Standard Date Format setting, so it is a bug.
However, if Tools > Preferences > General tab has Preferred Standard Date Format set to mmm dd, yyyy then it is impossible to enter an acceptable date and FH always produce an error message. Try it yourself with that setting.
We are not entering 1 May 2021 but are entering May 1, 2021 and that is what FH complains about.
The Query filter should work regardless of the Preferred Standard Date Format setting, so it is a bug.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- Gary Carson
- Famous
- Posts: 162
- Joined: 02 Mar 2016 17:46
- Family Historian: V7
- Location: Grand Island, Nebraska, USA
Re: Last Updated Query
I have reported the error to Calico Pie via http://www.calico-pie.com/osticket/open.php on May 30.
Gary
Win 10, FH 7.0.15
Win 10, FH 7.0.15