Page 1 of 1
Data expression for year
Posted: 12 Jul 2011 09:22
by RogerF
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
Posted: 12 Jul 2011 10:30
by Jane
:ABBREV shows just the month year and modifier.
Data expression for year
Posted: 12 Jul 2011 12:54
by PeterR
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:
Code: Select all
=Text(Text(%FAM.MARR.DATE:YEAR%) . TextIf(%FAM.MARR.DATE:XDATETYPE% = 'approx',
' (app)',TextIf(%FAM.MARR.DATE:XDATETYPE% = 'calculated',' (est)',)))
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.
Data expression for year
Posted: 12 Jul 2011 21:26
by RogerF
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...)