1

Topic: Date ranges with unknown start cause wrong sample year in reporting

This issue is best described with a screenshot:

http://i.imgur.com/OwnR9qC.png

In the Sample Date column we have "- 2002" as the date, which is perfectly valid in Recorder, yet the Sample Year is reporting as 1899 which is incorrect. If we put in a date of 'Unknown' the Sample Year reports as blank, which is what I'd expect of the unknown start date range, too.

Charles

Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital

2

Re: Date ranges with unknown start cause wrong sample year in reporting

Will add this as a requested change  for a future release.  You can fix this immediately by running the following SQL
 
UPDATE REPORT_ATTRIBUTE SET ATTRIBUTE_SQL = '#REPORT_OUTPUT.[Sample Year] = CASE WHEN SAMPLE.VAGUE_DATE_TYPE IN (''U'', ''M'', ''S'',''-Y'') THEN NULL ELSE dbo.FormatDatePart(SAMPLE.VAGUE_DATE_START, SAMPLE.VAGUE_DATE_END, SAMPLE.VAGUE_DATE_TYPE, 0) END ' WHERE
REPORT_ATTRIBUTE_KEY = 'NBNSYS0000000048'

Mike Weideli

3

Re: Date ranges with unknown start cause wrong sample year in reporting

Thanks Mike, that worked perfectly.

Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital