What's the best approach to change the date format in a document?

descendant report 20250203 0832.pdf (74.6 KB)

The attached file is an example of the report produced by Charting Companion which is unable to display dates in the standard genealogical format of D MMM YYYY, but is governed by Windows settings’ Short Date; e.g. 3/25/1759

Is it possible using Writer, to change the date format? e.g., 25 Apr 1759

The only document format Charting Companion produces is .rtf

Thank you for any reply.

Kind regards,

Kelly

FYI & FWIW - Windows 10, Settings, Time & Language, Date & Time, Related settings, Date, time & regional formatting, Regional format data, Change data formats, the list of available formats doesn’t support d mmm yyyy

Your attached document is a PDF. As such, it is considered a graphics file and will be opened by Draw. In Draw, your document appears as a set of shapes, notably labelled rectangular shapes.

Modifying a collection of text boxes is tedious and not user-friendly… You should try to find how to configure Charting Companion to output dates the way you like. If this is governed by W$, change temporarily OS setting while you create your report and restore it afterwards.

You say that Charting Companion can only output RTF. Then open this file in a text editor offering regexp. Then search for (\d\d?)/(\d\d?)/(\d\d\d\d) and replace with $2/$1/$3.

1 Like

@ajlittoz
Thank you! That regexp worked great; however, it only produced; e.g.,

  1. David1 Howe [1], born 25/3/1759 in Boston, British America; died 3/11/1828

What I was hoping to see is 25 Mar 1759, 3 Nov 1828, etc.

As for the PDF, I was only able to upload this format.

If you can script the text editor, add 12 regexp like this after application of the “numeric” rule:
(\d\d?/)1(/\d\d\d\d)$1Jan$2

You can also use directly 12 regexp instead of 1 (to switch dd with mm) + 12 month naming:
1/(\d\d?)(/\d\d\d\d)$1/Jan$2


I let you write the others.

1 Like

@ajlittoz
Got it! Thank you so much!
As for scripting the whole process using Writer, I will have to study, but for now using Find & Replace (Ctrl+h) with your regexp examples manually and incrementally works perfectly.
Kind regards, Kelly