* Abbreviated month name
Abbreviated month name
Hi All,
I would like the birth dates to be displayed in the following format: YEAR ABBREVIATED_MONTH DAY
The built in date formats do not support this format, I tried to compile the date from fragments.
Is it possible to query the month name in abbreviated version? All I found is %INDI.BIRT.DATE:MONTH_NAME% that is the long variant.
https://imgur.com/rb7kUw8
Thanks
I would like the birth dates to be displayed in the following format: YEAR ABBREVIATED_MONTH DAY
The built in date formats do not support this format, I tried to compile the date from fragments.
Is it possible to query the month name in abbreviated version? All I found is %INDI.BIRT.DATE:MONTH_NAME% that is the long variant.
https://imgur.com/rb7kUw8
Thanks
- tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Abbreviated month name
I don't think that is possible in FH v6.2 but should be possible in FH v7.0 by using the =LeftText() function.
e.g.
=LeftText( %INDI.BIRT.DATE:MONTH_NAME%, 3 )
Where exactly do you want that date format to be displayed?
You mentioned querying the month name, so what is your query Expression?
e.g.
=LeftText( %INDI.BIRT.DATE:MONTH_NAME%, 3 )
Where exactly do you want that date format to be displayed?
You mentioned querying the month name, so what is your query Expression?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Abbreviated month name
Thanks for the reply
I would like to use it for diagrams so that the date consumes less space. I will try it in FH7 after I update to it.
I tried with this: %INDI.BIRT.DATE:YEAR% %INDI.BIRT.DATE:MONTH_NAME% %INDI.BIRT.DATE:DAY%
I think all I should do is to use your example.
I would like to use it for diagrams so that the date consumes less space. I will try it in FH7 after I update to it.
I tried with this: %INDI.BIRT.DATE:YEAR% %INDI.BIRT.DATE:MONTH_NAME% %INDI.BIRT.DATE:DAY%
I think all I should do is to use your example.
- tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Abbreviated month name
You can set Tools > Preferences > Preferred Short Date Format to such as yyyy/mm/dd all numeric format.
e.g. 2021/8/11
There is also yyyy.mm.dd and yyyy-mm-dd formats for year month day.
They are all even shorter than your yyyy mmm dd scheme.
Then in Diagram > Options > Text > Edit the Date Format can be set to Abbrev(3) to apply that Short Date Format.
I presume you are aware of all the Date Formats: https://www.family-historian.co.uk/help ... rmats.html?
e.g. 2021/8/11
There is also yyyy.mm.dd and yyyy-mm-dd formats for year month day.
They are all even shorter than your yyyy mmm dd scheme.
Then in Diagram > Options > Text > Edit the Date Format can be set to Abbrev(3) to apply that Short Date Format.
I presume you are aware of all the Date Formats: https://www.family-historian.co.uk/help ... rmats.html?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Abbreviated month name
Thanks, it works for me too. I was not aware of the date format possibilities in such a details but now I am.
Last question in this topic, can I force somehow that month and days are displayed in 2 digit format always like 2001.05.12 instead of 2001.5.12?
Last question in this topic, can I force somehow that month and days are displayed in 2 digit format always like 2001.05.12 instead of 2001.5.12?
- tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Abbreviated month name
No, that does not seem to be possible with any of the available date format settings.
You are not the first to have asked about that display mode.
It might be possible with complex use of functions, but I'm not sure.
You are not the first to have asked about that display mode.
It might be possible with complex use of functions, but I'm not sure.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- Mark1834
- Megastar
- Posts: 2146
- Joined: 27 Oct 2017 19:33
- Family Historian: V7
- Location: South Cheshire, UK
Re: Abbreviated month name
Frustratingly, that format is available in reports using functions, but I can't see any way of getting it into a diagram. I use this distinct format for Date Updated in reports so it is not mistaken for a fact date on a skim read.
Mark Draper
- tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Abbreviated month name
How do you specify that date format in the report?
Are you simply using the =LastUpdated() function over which you have no control of the date format?
It does not honour the Tools > Preferences > Preferred Short Date Format setting.
I suspect it uses its own unique format.
Are you using the =MidText() function to extract the digits and recombining with the =Text() function?
Are you simply using the =LastUpdated() function over which you have no control of the date format?
It does not honour the Tools > Preferences > Preferred Short Date Format setting.
I suspect it uses its own unique format.
Are you using the =MidText() function to extract the digits and recombining with the =Text() function?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Abbreviated month name
Assume Tools > Preferences > Preferred Short Date Format has its default setting dd/mm/yyyy.
Then the following complex expression will yield the format yyyy-mm-dd with leading zeros where needed.
=RightText(%INDI.BAPM.DATE:ABBREV3%,4)-=RightText(Text("0".Section(%INDI.BAPM.DATE:ABBREV3%,2,"/")),2)-=RightText(Text("0".Section(%INDI.BAPM.DATE:ABBREV3%,1,"/")),2)
Breaking that down:
=RightText(%INDI.BAPM.DATE:ABBREV3%,4) extracts the rightmost 4 year digits.
=RightText(Text("0".Section(%INDI.BAPM.DATE:ABBREV3%,2,"/")),2) extracts 2nd section month digit(s), prefixed with "0", and yields the rightmost 2 digits that ensures a leading zero is included if necessary.
=RightText(Text("0".Section(%INDI.BAPM.DATE:ABBREV3%,1,"/")),2) does the same for 1st section day digit(s).
Thus 4/8/1900 will produce 1900-08-04
However, this only works for simple dates and not Period or Range dates, etc.
Then the following complex expression will yield the format yyyy-mm-dd with leading zeros where needed.
=RightText(%INDI.BAPM.DATE:ABBREV3%,4)-=RightText(Text("0".Section(%INDI.BAPM.DATE:ABBREV3%,2,"/")),2)-=RightText(Text("0".Section(%INDI.BAPM.DATE:ABBREV3%,1,"/")),2)
Breaking that down:
=RightText(%INDI.BAPM.DATE:ABBREV3%,4) extracts the rightmost 4 year digits.
=RightText(Text("0".Section(%INDI.BAPM.DATE:ABBREV3%,2,"/")),2) extracts 2nd section month digit(s), prefixed with "0", and yields the rightmost 2 digits that ensures a leading zero is included if necessary.
=RightText(Text("0".Section(%INDI.BAPM.DATE:ABBREV3%,1,"/")),2) does the same for 1st section day digit(s).
Thus 4/8/1900 will produce 1900-08-04
However, this only works for simple dates and not Period or Range dates, etc.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- Mark1834
- Megastar
- Posts: 2146
- Joined: 27 Oct 2017 19:33
- Family Historian: V7
- Location: South Cheshire, UK
Re: Abbreviated month name
You may recall that this was discussed at some length earlier this year. Jane pointed out that LastUpdated() returns the date as specified in the user's Windows Short Date Format, so it is not directly controllable from within FH. However, if you use =Date(LastUpdated()), you can format the individual elements as you choose.
The full formula for producing the ISO format of yyyy-mm-dd is
=Year(LastUpdated())-=TextIf(Month(LastUpdated())<10,"0")=Month(LastUpdated())-=TextIf(Day(LastUpdated())<10,"0")=Day(LastUpdated())
I can't claim any credit for that. It was actually you that devised the full version to include leading zeros, but after 22,000 posts, you're allowed not to remember them all
. Unfortunately for the OP, this only works in Reports, as Diagrams only allow dates in a predetermined FH format, not flexibly via functions.
The full formula for producing the ISO format of yyyy-mm-dd is
=Year(LastUpdated())-=TextIf(Month(LastUpdated())<10,"0")=Month(LastUpdated())-=TextIf(Day(LastUpdated())<10,"0")=Day(LastUpdated())
I can't claim any credit for that. It was actually you that devised the full version to include leading zeros, but after 22,000 posts, you're allowed not to remember them all
Mark Draper
- Mark1834
- Megastar
- Posts: 2146
- Joined: 27 Oct 2017 19:33
- Family Historian: V7
- Location: South Cheshire, UK
Re: Abbreviated month name
Think we were both typing at the same time! I prefer your earlier version, as it is simpler.
Mark Draper
- tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Abbreviated month name
Thank you for reminding me of that earlier expression. For a fact date that becomes:
=Year(%INDI.BAPM.DATE%)-=TextIf(Month(%INDI.BAPM.DATE%)<10,"0")=Month(%INDI.BAPM.DATE%)-=TextIf(Day(%INDI.BAPM.DATE%)<10,"0")=Day(%INDI.BAPM.DATE%)
It is a bit simpler, copes with all forms of date, and works in FH v6.2 too.
So for Period and Range dates, it will show the first date of two dates.
Not sure why you say it won't work in Diagrams as functions are allowed to override the default Date format.
I have put exactly the above expression into a Text Scheme item Template and it works the same as in a Report.
One wrinkle I have spotted is that whereas =LastUpdated() always has a day & month, fact dates might not.
So dates may be produced such as 1900 and 1900-08 but that is probably OK.
Overall, that is a better outcome than I first predicted.
=Year(%INDI.BAPM.DATE%)-=TextIf(Month(%INDI.BAPM.DATE%)<10,"0")=Month(%INDI.BAPM.DATE%)-=TextIf(Day(%INDI.BAPM.DATE%)<10,"0")=Day(%INDI.BAPM.DATE%)
It is a bit simpler, copes with all forms of date, and works in FH v6.2 too.
So for Period and Range dates, it will show the first date of two dates.
Not sure why you say it won't work in Diagrams as functions are allowed to override the default Date format.
I have put exactly the above expression into a Text Scheme item Template and it works the same as in a Report.
One wrinkle I have spotted is that whereas =LastUpdated() always has a day & month, fact dates might not.
So dates may be produced such as 1900 and 1900-08 but that is probably OK.
Overall, that is a better outcome than I first predicted.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- Mark1834
- Megastar
- Posts: 2146
- Joined: 27 Oct 2017 19:33
- Family Historian: V7
- Location: South Cheshire, UK
Re: Abbreviated month name
Excellent, we got there in the end between us. I was hoping that as diagrams have a global setting for date format (unlike reports), it would be possible to customise that so it's done just once. That's what I was referring to, but yes, each separate fact can be customised individually. It's a fair bit of work, but it only has to be done once.
Mark Draper