Page 1 of 1

Marriage length

Posted: 12 Jan 2013 08:50
by Forpm
Someone has asked me if their parents' 70th wedding anniversary represents a record anniversary within our family.

Is there a query available to show the length of a marriage (i.e. from marriage date to divorce or death of one partner)?

ID:6694

Marriage length

Posted: 12 Jan 2013 11:32
by Jane
I could not think of a quick way in a query, but I have done a quick plugin.

You'll need to 'sanity' check results where there the life dates are not complete for the partners.

https://www.dropbox.com/s/r7u0id5o8saaz ... ort.fh_lua

Marriage length

Posted: 12 Jan 2013 12:37
by Forpm
Many thanks. Much appreciated.

It almost works except for when there is a death date for the wife but no death date for the husband, when it then seems to use today's date to calculate the marriage length.

Marriage length

Posted: 13 Jan 2013 18:57
by Jane
I'll see if I can fix it, might be a day or so as I am a bit busy with other things at the moment.

Marriage length

Posted: 13 Jan 2013 19:06
by johnmorrisoniom
I didn't get any like that, but those without dates had an lifespan of about 90 assumed.
I also had a few negative results, but a bit of extra research sorted them out.

Marriage length

Posted: 13 Jan 2013 21:11
by TimTreeby
There are actually two problems with this plugin, one is easy to fix the other needs a bit more thinking about.

The problem as reported by forpm is down to if Husband Estimated Death Date is a future date then a Null is returned which throws the calculations out. Can prove this by just checking option to estimate future death dates.

See example

Image

Wrong Marriage Length
Image

Correct Marriage Length
Image

The other fix is slightly easier and justs needs variable in EstimatedDeathDate changed from MID to LATEST. See example

Image

Wrong Marriage Length
Image

Correct Marriage Length
Image

Marriage length

Posted: 14 Jan 2013 09:18
by Jane
I have fixed the Null problem on the Estimated dates, and changed it over to LATEST, the same link should work.

I wondered about skipping people with missing dates, but could not decide where to draw the line as for example my own marriage has both partners living so would be skipped from the report if I omit records where both have no death dates.

Marriage length

Posted: 14 Jan 2013 09:52
by Forpm
Thanks for all this and to Jane for writing the plugin.

I think there is still a problem, now in reverse to the one I posted earlier.

If there is a death date for the husband, but not for the wife, then the marriage length is calculated using today's year.

Marriage length

Posted: 14 Jan 2013 12:45
by Jane
I have given it another go any better?

Marriage length

Posted: 14 Jan 2013 13:00
by TimTreeby
Seems to be fine now for me.

Marriage length

Posted: 14 Jan 2013 17:00
by johnmorrisoniom
I got no change in results between 0.2 & 0.3 , but I was happy anyway.
0.3 now correctly shows that it is running in the plugin window, 0.1 & 0.2 did not.
An excellent tool for highlighting incomplete data. I will be using it daily (ish)

Marriage length

Posted: 14 Jan 2013 17:18
by Forpm
Jane - that is perfect now. Thanks so much for your help.

Marriage length

Posted: 16 Jan 2013 10:49
by Jane
This has now been added to the plugin store, it has a couple of extra columns and allows the selection of all or selected records.