Page 1 of 2

Change census date from Year to full date

Posted: 30 May 2019 08:14
by Gowermick
I'm sure this has been covered before, but as I can't find answer anywhere, I'll ask anyway.

Currently I use just the year for census dates, but feel it would be better if I changed these to actual date of Census.
e.g. Change 1841 to 7 June 1841.

Is there a simple way to achieve this using find and replace?

Re: Change census date from Year to full date

Posted: 30 May 2019 08:20
by johnmorrisoniom
If you have recorded the census as a census event, then the date checker in AS can do that for you.

See Knowledge Base > Ancestral Sources > Census Date Check.

Re: Change census date from Year to full date

Posted: 30 May 2019 09:17
by Gowermick
Thanks John, but there's the rub. I don't use or have Ancestral Sources

Re: Change census date from Year to full date

Posted: 30 May 2019 11:04
by johnmorrisoniom
Just download and install, it's free.

Re: Change census date from Year to full date

Posted: 30 May 2019 12:04
by AndyC
I used the' Search and Replace' plugin when I changed my census dates from a year to the exact date.

Re: Change census date from Year to full date

Posted: 30 May 2019 13:48
by Gowermick
I looked at that Andy, but how did you restrict the dates to just census dates!
With 19,000 individuals, I don't want to confirm every change!

Re: Change census date from Year to full date

Posted: 30 May 2019 14:21
by tatewise
In the Plugin just restrict the Scope to Census Events (CENS) and filter on Dates.
I add all these features as requested, but few seem to be able to see them :o

Ancestral Sources is a free install.

Re: Change census date from Year to full date

Posted: 30 May 2019 14:56
by Gowermick
Miketate,
Thanks for that, I’ll try again with a bit more confidence, knowing only census dates are covered.

Can I point out that I am using version 2.9, which according to plugin store was updated 4Jun 2018, but plugin states it was last updated 9 Feb 2018.

If people are missing the scope option (me included), perhaps it is because it is on the right, mixed in with the radio button options.

Personally I’d give it more prominence, possibly in its own box, on the left hand side, above the search and replace boxes, ( do these boxes need to be so large?). Just a thought :D

Re: Change census date from Year to full date

Posted: 30 May 2019 17:14
by tatewise
Can't remember why Plugin Store and Plugin dates differ, but I was aware, and V2.9 is the latest.

I'll have a look at your suggestion.

Re: Change census date from Year to full date

Posted: 30 May 2019 17:56
by Gowermick
Thanks Mike,
I like to add an update, your plugin worked a treat, and even flagged those entries I had already entered full date (plus one where I had entered wrong date! :D )

Re: Change census date from Year to full date

Posted: 31 May 2019 11:55
by tatewise
Would the Plugin dialogue layout shown below be an improvement?

It offers a more natural progression from Search Scope down through Basic Filters and the Search Mode...
SearchAndReplaceScope.png
SearchAndReplaceScope.png (25.46 KiB) Viewed 4032 times

Re: Change census date from Year to full date

Posted: 31 May 2019 16:32
by Gowermick
I think that's a lot better, at least Seach Scope has a bit more prominence, and shouldn't be overlooked

I would just comment that the Search and Replace fields being contained within the Search Mode box doesn't seem right somehow.

Perhaps they could be in their own Search & Replace box, leaving just the Radio buttons within a Search Mode box?

But that could just be me being picky :D

Nice work

Re: Change census date from Year to full date

Posted: 31 May 2019 17:09
by tatewise
They are there because the radio buttons on the right have a direct impact on them.

Re: Change census date from Year to full date

Posted: 31 May 2019 17:43
by Gowermick
I get that, but to describe Search and Replace as part of the Search Mode feels wrong! :D
Perhaps Search Criteria would be a better term.

Re: Change census date from Year to full date

Posted: 31 May 2019 17:51
by tatewise
Yes, that sounds good.

Re: Change census date from Year to full date

Posted: 01 Jun 2019 16:35
by jsphillips
When entering census data I click on add fact then click on Census and add full date ie 30 March 1861 , 7 April 1861 etc it

works and is reproduced on reports ??

Re: Change census date from Year to full date

Posted: 01 Jun 2019 17:08
by Gowermick
Jsphillips,
But, had you used just the year when you started out (20 years ago in my case), and now decided in hindsight that you should have used full date, you’d now have an extremely large amount of facts that need their dates correcting! (They say hindsight is 20-20 vision)

It does not help if I put full date in for new data, as the old data still needed correcting :D

The plugin from Miketate achieves this brilliantly.

Re: Change census date from Year to full date

Posted: 02 Jun 2019 05:52
by dewilkinson
I thought this would be a useful way of correcting incomplete census date entries where historically we have only entered the year. But as we now have 000s with the full date this doesn't help. See attached image. Is it possible to add to the search criteria "ignore 6th June 1841"?
Capture.JPG
Capture.JPG (43.95 KiB) Viewed 3903 times

Re: Change census date from Year to full date

Posted: 02 Jun 2019 07:04
by Gowermick
You could do it in two passes!
1. Change all "6 June 1841" to "1841", to bring all back to the same starting point
2. Change all "1841" to "6 June 1841"

OR

Create a named list for those with just "1841", then used the Named list to restrict the Scope of the Find and Replace

Note the change of Search Mode box, which now reads Search Criteria - apologies to MikeTate :D

Re: Change census date from Year to full date

Posted: 02 Jun 2019 07:54
by Jane
You should be able to use a Lua pattern to match the start of the string
2019-06-02_085350.jpg
2019-06-02_085350.jpg (99.1 KiB) Viewed 3884 times

Re: Change census date from Year to full date

Posted: 02 Jun 2019 08:37
by Gowermick
Jane,
Whilst your suggestion would be OK for census dates, (all dates for a specific CENS year would be the same) it wouldn’t work for the accompanying OCCU fact, as there may be other dates in 1841, which you wouldn’t want to change!

I am assuming (dangerous I know :D ), that if you have OCCU facts not associated with CENS, they will be full dates, not just years.

Re: Change census date from Year to full date

Posted: 02 Jun 2019 08:54
by Jane
If you really wanted to you could simply prompt for all the OCCU ones and skip the ones you wanted to leave or write your own plugin to check the source for the event and then check the source information to see where the item was sourced.

Re: Change census date from Year to full date

Posted: 02 Jun 2019 09:38
by tatewise
Mike, Jane's proposal of ^1841 will only match OCCU that have just 1841 as the Date.

Any more complete Date such as Jan 1841 or 6 June 1841 will NOT match the criteria.

Also, if that still needs further filtering, then use the Named List technique mentioned earlier, and then Select Records allows the Named List entries to be chosen.

Re: Change census date from Year to full date

Posted: 02 Jun 2019 11:18
by Gowermick
Thanks Mike, didn’t want to show my ignorance of LUA pattern matching. I thought ^1841 meant something else (like ending 1841) :oops:

Re: Change census date from Year to full date

Posted: 02 Jun 2019 13:08
by tatewise
^ is the pattern magic code that anchors the pattern to start of string
$ is the pattern magic code that anchors the pattern to end of string

So the search pattern could be ^1841$ and that would eliminate any Approx, Calc, Est qualifiers that might follow the year, assuming you wanted to exclude them.

See Knowledge Base > Understanding Lua Patterns that are similar to Regular Expressions.