CR 10 and SQL 2000
We have a free text field to input a date that a surgical procedure was performed. No entry is permissible, as well as non-numeric text and symbols. I know that some of the values will never lend themselves to a conversion, but I would hope that a large percentage would.
Here is some sample data from the{Surgical_HX.Surgical_HX_Date} field and their expected output:
Surgical_HX_Date Output
00 1/1/2000
'06 1/1/2006
97? 1/1/1997
1997 1/1/1997
1997,1993 1/1/1997
1993,1999, 2003 1/1/2003
1997,1998,2001,2004 1/1/2004
1998 ? 1/1/1998
2000 approx 1/1/2000
2001 or 2002 1/1/2001
1999 1/1/1999
~1997 1/1/1997
1980s 1/1/1980
2001-02 1/1/2001
About'01 1/1/2001
'91, '93, '97 1/1/1997
94, 95, 99 1/1/1999
1-06 1/1/2006
3/02 3/1/2002
04/97 4/1/1997
5/1996 5/1/1996
04/2002 4/1/2002
1/93, 9/96 9/1/1996
Feb. 2003 2/1/2003
Sept 04 9/1/2004
Sept. 2004 9/1/2004
normal 11/98 11/1/1998
11/4/96 11/4/1996
4/21/2000 4/21/2000
10-21-96 10/21/1996
4/1/2003 4/1/2003
4/1987-3/1991-6/1993-10/1998 10/1/1998
9/10/93 Dr. Carron 9/10/1993
age 61 no output
LATE 40S no output
15-20 years ago no output
? no output
The above are the most frequent enrtry "styles", but it is not all inclusive.
If no specific day is listed the output should default to the first of the month (if given) or first of the year. If the date cannot be calculated, then a dummy future date could be inserted (or no data) for a manual review.
Thank you for your help.
We have a free text field to input a date that a surgical procedure was performed. No entry is permissible, as well as non-numeric text and symbols. I know that some of the values will never lend themselves to a conversion, but I would hope that a large percentage would.
Here is some sample data from the{Surgical_HX.Surgical_HX_Date} field and their expected output:
Surgical_HX_Date Output
00 1/1/2000
'06 1/1/2006
97? 1/1/1997
1997 1/1/1997
1997,1993 1/1/1997
1993,1999, 2003 1/1/2003
1997,1998,2001,2004 1/1/2004
1998 ? 1/1/1998
2000 approx 1/1/2000
2001 or 2002 1/1/2001
1999 1/1/1999
~1997 1/1/1997
1980s 1/1/1980
2001-02 1/1/2001
About'01 1/1/2001
'91, '93, '97 1/1/1997
94, 95, 99 1/1/1999
1-06 1/1/2006
3/02 3/1/2002
04/97 4/1/1997
5/1996 5/1/1996
04/2002 4/1/2002
1/93, 9/96 9/1/1996
Feb. 2003 2/1/2003
Sept 04 9/1/2004
Sept. 2004 9/1/2004
normal 11/98 11/1/1998
11/4/96 11/4/1996
4/21/2000 4/21/2000
10-21-96 10/21/1996
4/1/2003 4/1/2003
4/1987-3/1991-6/1993-10/1998 10/1/1998
9/10/93 Dr. Carron 9/10/1993
age 61 no output
LATE 40S no output
15-20 years ago no output
? no output
The above are the most frequent enrtry "styles", but it is not all inclusive.
If no specific day is listed the output should default to the first of the month (if given) or first of the year. If the date cannot be calculated, then a dummy future date could be inserted (or no data) for a manual review.
Thank you for your help.