Page 1 of 1

Quotation marks around dates

Posted: 25 Feb 2010 21:05
by blackbill
I am evaluating FH to ensure that all my data will transfer correctly from Brothers Keeper which I use at present. When I import the GEDCOM file from BK all dates have quotation marks around them. For example '25 Feb 2009'.
Any idea what is causing this and how to get rid of the ' ?

ID:4373

Quotation marks around dates

Posted: 26 Feb 2010 06:58
by Jane
It's likely BK has exported the dates in an invalid gedcom format. If you post the gedcom line for one of the problem dates we can probably work out how to fix it.

Quotation marks around dates

Posted: 27 Feb 2010 14:43
by blackbill
Hi Jane

Here is an extract of the Gedcom file. The 18-APR-1952 is a typical example of a date which comes across to FH with quotation marks.

Regards
Bill

1 NAME William McKenzie /Black/
1 SEX M
1 CHAN
2 DATE 3 FEB 2005
1 BIRT
2 DATE 18-APR-1952
2 PLAC Fyvie Cottage Hospital, Aberdeenshire
2 SOUR @S83@
3 PAGE 1952/197/36
3 QUAY 3
2 _EVN 1
1 OCCU Mechanical Engineer
1 NOTE [bc:X] [mc:X] [dc:] [41:n/a] [51:n/a] [61:n/a] [71:n/a] [81:n/a] [91:n/a]
1 OBJE
2 FORM JPEG
2 FILE C:Program FilesBrother's Keeper 6PictureWilliam McK Black #1 (a).jpg
1 FAMS @F1@
1 FAMC @F2@
0 @I2@ INDI

Quotation marks around dates

Posted: 27 Feb 2010 15:19
by PeterR
Bill
The GEDCOM 5.5 Standard has very precise requirements for the format of an exact date, typically DD MMM YYYY (separated by a single space) where DD must be a 1- or 2-digit number, MMM must be one of JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC, and YYYY must be a 3- or 4-digit number (although YYYY/YY is also allowed for the 1752 adoption of the Gregorian calendar when the new year changed from March to January).  Your date 3 FEB 2005 is compliant, but unfortunately 18-APR-1952 is not, and would appear in FH as '18-APR-1952'.

If you cannot get Brothers Keeper to export dates in the correct GEDCOM format, you will have to edit the GEDCOM file to change all the hyphens to spaces.

Quotation marks around dates

Posted: 27 Feb 2010 17:55
by PeterR
Bill,
If you use a text editor such as PSPad (see http://www.fhug.org.uk/wiki/wiki/doku.p ... pad_editor and use the 'Downloads' links) you can do a global edit of all such invalid dates in your GEDCOM file by using Regular Expressions:

Code: Select all

Find: '( DATE [0-9]{1,2})-([A-Za-z]{3})-([0-9]{4})'
Replace: '$1 $2 $3'
For both the Find and Replace strings, omit the double-quote marks, but be careful to use exactly everything between them, e.g. a single space each side of 'DATE', and note the difference between parentheses '( )', brackets '[ ]', and braces '{ }' - so easiest just to copy and paste the above strings.
Please, as always, take appropriate precautions in case something goes wrong.

Quotation marks around dates

Posted: 28 Feb 2010 12:13
by blackbill
Peter

Many thanks for that. I was able to go into BK and change the date format for all records. It then transferred to FH satisfactorily.

Regards
Bill

Quotation marks around dates

Posted: 13 Sep 2011 16:12
by JohnVW
ref Peter R's advice to use a text editor to edit the GEDCOM file, can anyone advise me as a beginner who is not competent to do so and cannot take the risks involved? I have imported some 1100 names from BK6 to FH, many [though not all] of which have quotation marks around the dates. I want all the existing dates to be shown in the FH Abbrev format just as all the new ones are. Since that was simply a matter of choosing the right menu instruction, isn't there one for existing dates as well?

Quotation marks around dates

Posted: 13 Sep 2011 20:40
by tatewise
Unfortunately there is no feature in FH to reformat dates.
However, you could follow these steps:
(1) Make sure you take a backup of your GEDCOM data by using FH File > Backup/Restore > Backup.
(2) Close FH and locate your GEDCOM *.ged file.
(If do not know how to do this then post back here but tell us if you are using FH V4 Projects or not).
(3) Right-click on this *.ged file and choose Open with or Send to and select Notepad.
(Alternatively, use Start > All Programs > Accessories > Notepad and use File > Open; then bottom right click on Text Documents (*.txt) and change to All Files (*.*); finally navigate to and open your *.ged file.)
(4) Use Edit > Replace and enter Find what: -JAN- and Replace with: JAN tick Match case and click Replace All button.
(Note that the Replace with: has a single space before and after JAN)
(5) Repeat this last step for -FEB-,-MAR-, through to -NOV-, -DEC-.
(6) Click Cancel button and use File > Save then exit and all should be fixed.
(The only proviso is that you may have one of the -MMM- strings elsewhere than in dates and these will get replaced as well)

Quotation marks around dates

Posted: 13 Sep 2011 21:04
by GladToBeGrey
John: unfortunately not.  The dates inside quotation marks are known as a 'Date Phrase' and are held as character strings which FH doesn't attempt to interpret as a formatted date (cf your more recent dates, entered as dates) unless you provide an interpretation manually.

This form is used to record narrative date information (e.g. 'Easter 1921') where a precise date isn't known.

So, unfortunately, the editor route is the only one available to you if you want to do a bulk update.  The main thing is to take a copy of your gedcom file as a backup before you try the edits.  That way you can copy the unadulterated file back if something goes wrong.

See here for general info on the PSPAD editor.

To do the Find/replace:

- download and install PsPad
- open your GEDCOM file in PsPad
- ctrl-h to bring up the Find/Replace dialogue, ensure the 'Regular Expressions' option is ticked, then ..
- copy/paste the 'Find' phrase as described in the earlier post into the 'Find' box, and the 'Replace' phrase into the 'Replace' box
- click 'OK' and you should see all the 'quoted' date strings converted to 'proper' FH dates
- save the updated gedcom file

Open the updated gedcom file in FH and check the dates have been updated correctly.  If not, copy back the backup (unadulterated) version you made earlier (you did, din't you?) and try again.

Here is a link to an FHUG thread that discusses doing something similar, albeit to Queries rather than Dates:



HTH
John