1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Time Function in Progress 4GL

Discussão em 'StackOverflow' iniciado por fdantas, Julho 2, 2019.

  1. fdantas

    fdantas Administrator Moderador

    I would like to insert 2 shift timings to the code.

    1. (First Shift) Shift starts from 8:00:00:000 to 19:59:59:999
    2. (Second Shift) Shift Starts from 20:00:00:000 to next day 7:59:59:999

    I need to get the above exact data to be added to the below code. Please help. Below is the code:

    IF TIME < (20 * 60 * 60) THEN DO:
    ASSIGN StartDDT = dt_tm2dec(DATE(TODAY), 0)
    EndDDT = dt_tm2dec(DATE(TODAY),19 * 60 * 60 + 59 * 60 + 59).
    END.
    ELSE DO:
    ASSIGN StartDDT = dt_tm2dec(DATE(TODAY),20 * 60 * 60).
    EndDDT = dt_tm2dec(DATE(TODAY + 1),07 * 60 * 60 + 59 * 60 + 59).
    END.

    Continue reading...

Compartilhe esta Página