Decoding DMSII Date/Time Represented as ALPHA or NUMBER

You can decode DMSII date/time formats represented as NUMBER or ALPHA items to relational database date/time data types using the DATABridge host or the DATABridge Client. To do this on the host, you must redefine the DMSII item using an ALTER REDEFINE. For more information, see Chapter 5, "Alter Data Sets" in the DATABridge Programmer’s Reference.

To decode DMSII date/time formats represented as NUMBER or ALPHA items

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

    Note: If your DMSII date/time encoding scheme is not listed in the following table, see the next section.

    Date/Time Encoding Scheme

    Value for dms_subtype Column

    ALPHA(14) or NUMBER(14) with four-digit year followed by a six-digit time

    yyyymmddhhmnss
    yyyyddmmhhmnss
    mmddyyyyhhmnss
    mmyyyyddhhmnss
    ddmmyyyyhhmnss
    ddyyyymmhhmnss

     



    121
    122
    123
    124
    125
    126

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

    DDDyyyyhhmnss
    yyyyDDDhhmnss





    127
    128

    ALPHA(12) or NUMBER(12) with two-digit year representing dates in both the 20th and 21st centuries followed by a six-digit time3

    yymmddhhmnss
    yyddmmhhmnss
    mmddyyhhmnss
    mmyyddhhmnss
    ddmmyyhhmnss
    ddyymmhhmnss

     

     


    131
    132
    133
    134
    135
    136

    ALPHA(11) or NUMBER(11) with two-digit year representing dates in both the 20th and 21st centuries where days DDD is a number between 1–366 for Julian dates followed by a six-digit time*

    DDDyyhhmnss
    yyDDDhhmnss

     

     

     

    137
    138

    ALPHA(12) or NUMBER(12) with two-digit year yy
    (1900–1999) preceded by a six-digit time

    hhmnssyymmdd
    hhmnssyyddmm
    hhmnssmmddyy
    hhmnssmmyydd
    hhmnssddmmyy
    hhmnssddyymm

     



    211
    212
    213
    214
    215
    216

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

    hhmnssDDDyy
    hhmnssyyDDD

     


    217
    218

    ALPHA(14) or NUMBER(14) with four-digit year preceded by a six-digit time

    hhmnssyyyymmdd
    hhmnssyyyyddmm
    hhmnssmmddyyyy
    hhmnssmmyyyydd
    hhmnssddmmyyyy
    hhmnssddyyyymm

     



    221
    222
    223
    224
    225
    226

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

    hhmnssDDDyyyy
    hhmnssyyyyDDD

     


    227
    228

    ALPHA(12) or NUMBER(12) with two-digit year representing dates in both the 20th and 21st centuries preceded by a six-digit time

    hhmnssyymmdd
    hhmnssyyddmm
    hhmnssmmddyy
    hhmnssmmyydd
    hhmnssddmmyy
    hhmnssddyymm

     




    231
    232
    233
    234
    235
    236

    ALPHA(11) or NUMBER(11) with two-digit year representing dates in both the 20th and 21st centuries where days DDD is a number between 1–366 for Julian dates preceded by a six-digit time*

    hhmnssDDDyy
    hhmnssyyDDD






    237
    238

*The configuration parameter century_break allows you to adjust the range for the year.

For example scripts, see Cloning an Alpha or Number Field As a Date/Time.