Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Condition With hours

Hello Everyone!   I need your help in calculating a column which give me either a 1 o 0, a 1 when in the column "HORA_INGRESO" is after 10:30 and the column "CD" is 1011, other wise the result wuld...
  • edhans's avatar
    7 years ago

    Use the following formula for your calculated column:

     

    IF(Times[Time]>TIME(10, 30, 0) && Times[CD]="1011",1,0)

     

    You'll need to translate that to your column names, but the key is you are comparing your time column to the TIME() function. The && allows you to add additional comparisons to the IF() statement. 

  • Ashish_Mathur's avatar
    7 years ago

    Hi,

     

    Try this calculated column formula

     

    =IF(AND(CABECERAPEDIDOSAP[HORA_INGRESO]>TIME(10,30,0);CABECERAPEDIDOSAP[CD]="1011");1;0)

     

    Hope this helps.