Decoding DMSII Dates Represented as ALPHA or NUMBER

Use the following procedure to decode DMSII dates represented as NUMBER or ALPHA items to relational database data types.

To decode dates represented as NUMBER or ALPHA items

  1. Write a script (script.user_layout.primary_tablename) that does the following:
  2. Sets the DIOPT_Clone_as_Date (2) bit in di_options.
  3. Sets the dms_subtype field in DMS_ITEMS to indicate the type of date encoding method used on the host, as follows:

    Date Encoding Scheme

    Value for dms_subtype Column

    NUMBER(n) for MISER dates—days since 12/31/1899

    1

    NUMBER(n) for LINC dates—days since 1/1/baseyear (default 1957)

    3

    ALPHA(6) or NUMBER(6) with two-digit year yy (1900–1999)

    yymmdd
    yyddmm
    mmddyy
    mmyydd
    ddmmyy
    ddyymm



    11
    12
    13
    14
    15
    16

    ALPHA(5) or NUMBER(5) with two-digit year yy (1900–1999) and with days DDD where DDD is a number between 1–366 for Julian dates

    DDDyy
    yyDDD



    17
    18

    ALPHA(8) or NUMBER(8) with four-digit year yyyy

    yyyymmdd
    yyyyddmm
    mmddyyyy
    mmyyyydd
    ddmmyyyy
    ddyyyymm



    21
    22
    23
    24
    25
    26

    ALPHA(7) or NUMBER(7) with four-digit year yyyy and with days DDD where DDD is a number between 1–366 for Julian dates

    DDDyyyy
    yyyyDDD





    27
    28

    ALPHA(6) or NUMBER(6) with two-digit year yy (1950–2049) where yy values < 50 are 21st century years (20yy) and yy values > 50 are 20th century years (19yy)2

    yymmdd_2000
    yyddmm_2000
    mmddyy_2000
    mmyydd_2000
    ddmmyy_2000
    ddyymm_2000





    31
    32
    33
    34
    35
    36

    ALPHA(5) or NUMBER(5) with two-digit year yy (1950–2049) where yy values < 50 are 21st century years (20yy) and yy values > 50 are 20th century years (19yy) and with days DDD where DDD is a number between 1–366 for Julian dates.*

    DDDyy_2000
    yyDDD_2000

     

     

     

    37
    38

    ALPHA(8) with two-digit year yy (1900–1999) and with delimiter characters where / represents forward slash (/), hyphen (-), or period (.).

    yy/mm/dd
    yy/dd/mm
    mm/dd/yy
    mm/yy/dd
    dd/mm/yy
    dd/yy/mm





    41
    42
    43
    44
    45
    46

    ALPHA(10) with four-digit year yyyy and with delimiter characters where / represents forward slash (/), hyphen (-), or period (.).

    yyyy/mm/dd
    yyyy/dd/mm
    mm/dd/yyyy
    mm/yyyy/dd
    dd/mm/yyyy
    dd/yyyy/mm





    51
    52
    53
    54
    55
    56

    ALPHA(8) with two-digit year yy (1950–2049) where yy values < 50 are 21st century years (20yy) and yy values > 50 are 20th century years (19yy) and with delimiter characters where / represents forward slash (/), hyphen (-), or period (.).*

    yy/mm/dd_2000
    yy/dd/mm_2000
    mm/dd/yy_2000
    mm/yy/dd_2000
    dd/mm/yy_2000
    dd/yy/mm_2000

     

     



    61
    62
    63
    64
    65
    66

    ALPHA(7) with two-digit year yy (1900–1999) and three-character month abbreviation (mon). Month abbreviations are JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, and DEC unless specified otherwise by the months parameter in the DATABridge Client configuration file.

    yymondd
    yyddmon
    monddyy
    monyydd
    ddmmyy
    ddyymon

     

     




    71
    72
    73
    74
    75
    76

    ALPHA(9) with four-digit year (yyyy) and three-character month abbreviation (mon). Month abbreviations are JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, and DEC unless specified otherwise by the months parameter in the DATABridge Client configuration file.

    yyyymondd
    yyyyddmon
    monddyyyy
    monyyyydd
    ddmonyyyy
    ddyyyymon

     

     




    81
    82
    83
    84
    85
    86

    ALPHA(7) with two-digit year yy (1950–2049) where yy values < 50 are 21st century years (20yy) and yy values > 50 are 20th century years (19yy) and with three-character month abbreviations (mon). Month abbreviations are JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, and DEC unless specified otherwise by the months parameter in the DATABridge Client configuration file.*

    yymondd_2000
    yyddmon_2000
    monddyy_2000
    monyydd_2000
    ddmonyy_2000
    ddyymon_2000






     

    91
    92
    93
    94
    95
    96

* The configuration parameter century_break allows you to adjust the range for the year. The default value for century_break is 50.

For example scripts, see Cloning a Numeric Field as a Date and Cloning an Alpha Field as a Date.

Note: If your DMSII date format includes mmyy or yymm without a position for days, see Unique DMSII Date/Time Represented as ALPHA or NUMBER.