In the Family Records windows, I use the expression
FAM.MARR[1].DATE:YEAR
to show the year of the marriage. This produces a simple number:
1850
What I'd like to see is one of:
1850
1850 (app)
1850 (est)
depending on the underlying data. Possible?
ID:5217
* Data expression for year
- Jane
- Site Admin
- Posts: 8442
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Data expression for year
:ABBREV shows just the month year and modifier.
- PeterR
- Megastar
- Posts: 1129
- Joined: 10 Jul 2006 16:55
- Family Historian: V7
- Location: Northumberland, UK
Data expression for year
I think MARR.DATE:ABBREV will show the day as well as month and year.
You can, however, use the following expression to define a new column:
As Tatewise has pointed out previously, having to use 'calculated' in this context is certainly not documented and may be a 'feature' of v4.1.3, but it seems to do the trick.
You can, however, use the following expression to define a new column:
Code: Select all
=Text(Text(%FAM.MARR.DATE:YEAR%) . TextIf(%FAM.MARR.DATE:XDATETYPE% = 'approx',
' (app)',TextIf(%FAM.MARR.DATE:XDATETYPE% = 'calculated',' (est)',)))- RogerF
- Famous
- Posts: 182
- Joined: 26 Apr 2009 16:32
- Family Historian: V6.2
- Location: Oxfordshire, England
- Contact:
Data expression for year
Many thanks, Peter.
As you say, MARR.DATE:ABBREV doesn't hack it, but the expression that you provide (with a small version-related improvement) does the job nicely. But who'd have thought XDATATYPE would have provided the answer, given that its description is: 'Gives information about the type of a date. Use in conjunction with XDATE1 and XDATE2 for copying dates to other applications'? Maybe it's just me, but I sometimes feel that FH's 'advanced' features are somewhat under-documented (which is a shame, given the power that's lurking there...)
As you say, MARR.DATE:ABBREV doesn't hack it, but the expression that you provide (with a small version-related improvement) does the job nicely. But who'd have thought XDATATYPE would have provided the answer, given that its description is: 'Gives information about the type of a date. Use in conjunction with XDATE1 and XDATE2 for copying dates to other applications'? Maybe it's just me, but I sometimes feel that FH's 'advanced' features are somewhat under-documented (which is a shame, given the power that's lurking there...)