Description
Applies the OCR for AnyDoc date extraction routine to the data.
Applicable Events
Post Extract, AnyApp Post Extract, Pre-Verify, Interactive, Verification Function Key (F-Key), Post-Verify
Syntax
object.ApplyDateExtraction strInput, strOutput [ ,intMinYear , intMaxYear ]
Parameters
Object is a reference to the Zone or Line object. For more information, see Zone Object (page Zone Object) or Line Object (page Line Object).
ApplyDateExtraction is the command.
strInput is a string expression indicating the assumed date input format. Choose from the following options:
Option |
Description |
---|---|
MDY |
Standard Month / Day / Year |
MY |
Two part date with month and year only. |
MD |
Two part date with month and day only. |
DMY |
International Three part date, Day / Month / Year. |
DM |
International two part date, with day and month only. |
YMD |
ISO 8601 |
strOutput is a string expression indicating the date output format. Choose from the following options:
Option |
Description |
---|---|
YYMMDD Standard |
Standard six-digit date, items are zero filled. |
DDMMYY Std Int'l |
Standard International six-digit date, items are zero filled. |
MMDDYY Standard |
Standard six-digit date, items are zero filled. |
DD Day (zero filled) |
Two-digit day, zero filled if appropriate. |
D# Day |
Day of the month (between 1 and 31). |
M# Month |
Month number (between 1 and 12). |
MM Month (zero filled) |
Two-digit month number, zero-filled if appropriate. For example, May is 05. |
MO Month (Abbreviation) |
Three character standard month abbreviation. For example, October is OCT. |
MN Month (full) |
Month name spelled out. For example, October. |
MH Month (Hollerith Code) |
Month is converted to single character Hollerith Code equivalent. Jan thru Sep is 1 – 9, Oct is 0 (zero), Nov is - (minus), and Dec is & |
Y1 Year (1 digit) |
Only the year digit is output. For example, 1987 would output 7, 1992 would output 2. |
YY Year (2 digit) |
Outputs the decade and year. For example, 1987 would output 87, and 2004 would output 04. |
Y3 Year (3 digit) |
Outputs the century, decade, and year. For example, 1987 would output 987, and 2004 would output 004. |
Y4 Year (4 digit) |
Outputs the four digit year. For example, 1987 would output as 1987. |
C2 Current Year |
Outputs current year's decade and year. Note that if the month in the date has not yet occurred, the current year is last year. Thus, if it is March 12, 2004 today, a date of January 7 is output as 04, but a date of April 2 outputs as 03. |
C4 Current Year |
Outputs the four digit current year. See note in C2 Current Year. |
– Hyphen |
Places a hyphen in the output. |
/ Slash |
Places a slash in the output. |
Do not use these optional parameters if the dates in your processing project span more than ninety-nine years.
This method has an optional boolean return value. It can be used in if - then statements to determine if date extraction was successful.
Example
'Apply Date Extract
This.ApplyDateExtraction "MDY", "MMDDY4"
'Example of using year range arguments AND boolean return (interactive)
If This.ApplyDateExtraction("MDY", "MMDDY4", 1999, 2004) Then
'Code here if date is good
This.Flagged = False
Else
'Code here if date is not good
This.Flagged = True
This.CustomMessage = "Date falls outside of 1999 - 2004 range; please correct."
End If