Page 1 of 1
Sorting dates with before and after?
Posted: 28 Oct 2019 10:14
by E Wilcock
I use fh for historical research. Listing war dead from WW1 or Holocaust deaths, there may be no exact death date so many involve a date including the word before or after.
When I sort a named list by date of death, the sort order ignores the words before and after. And sorts both according to surname of the person.
So I cant immediately see how many survived.
This failure to sort may be due to my lazy data entry as I sometimes just type in after 1918 or after 1945. But German source sites using a more exact cut off point
before 08.05.1945
also use the before and after convention.
Re: Sorting dates with before and after?
Posted: 28 Oct 2019 11:03
by tatewise
I have experimented with sorting a
Death Date column in a
Named List and it sorts according to the
Date given ignoring the
before or
after prefix, and positions the entry correctly among other dates that don't have such a prefix.
So I don't understand the problem you are describing.

- NamedListSortByDate.png (24.66 KiB) Viewed 4538 times
Re: Sorting dates with before and after?
Posted: 28 Oct 2019 12:44
by E Wilcock
Mike I need to sort who died before June 1945 from the people who died after June 1945 so the difference between before and after is vital.
Same goes for November 1918.
Re: Sorting dates with before and after?
Posted: 28 Oct 2019 14:34
by tatewise
OK, so this might not be the perfect solution, but may help.
Create another Column with Heading of Date Type and Expression of %INDI.DEAT.DATE:XDATETYPE%
Set its Sort Direction to Descending.
In the Named List first click on Date Type column header to sort by type.
Then click on Death Date column header to sort by date.
All the before June 1945 dates will be grouped together, separate from the after June 1945 group, and separate from any exactly June 1945 group.
Re: Sorting dates with before and after?
Posted: 28 Oct 2019 20:00
by E Wilcock
Thank you so much Mike. You are a genius.
That sorts it enough for me to tot up.
Re: Sorting dates with before and after?
Posted: 25 Oct 2021 09:26
by E Wilcock
I have just gone back to this Mike as never really mastered it before.
It has now dawned on me that one can sort query results by more than one column and this progressive sorting is what you were telling me to do. But I am still not getting it right.
Re: Sorting dates with before and after?
Posted: 25 Oct 2021 09:32
by tatewise
It is difficult to advise what to correct without a full description of your current attempt and what is not right.
You know what you have tried and what you want to achieve but we don't!
Re: Sorting dates with before and after?
Posted: 25 Oct 2021 16:58
by E Wilcock
I solved the problem Mike by changing my data entry and using your plug in to find and replace.
Instead of using before and after 8 May 1945 (end of war in Europe) I changed the after 8 May 1945 dates to after 9 May 1945.
I have been using this "before" and "after" date entry only for people whose exact date of death remains unknown. And it is pointless to create an unecessary sorting problem. There probably is an fh solution. But I am not as sharp as I once was.