Operations with timestamps

Papad
Papad New Altair Community Member
edited November 5 in Community Q&A
Hello,
I want to generate a new binominal column in my dataset. The formula I want to give is : 
when I substract two timestamps and the result is 10 seconds then put 0, else put 1.
Generally, I want my feedback every 10 seconds so if a next timestamp is after a different time , there is a problem which I have to see. So how could I do it? 
Thanks in advance.

Best Answer

  • sgenzer
    sgenzer
    Altair Employee
    Answer ✓
    hi @Papad you can do this with Generate Attributes using the date_diff() function. It takes two timestamp attributes and calculates the difference between them in milliseconds. Just divide by 10000 and that should work for you.

    Scott

Answers

  • sgenzer
    sgenzer
    Altair Employee
    Answer ✓
    hi @Papad you can do this with Generate Attributes using the date_diff() function. It takes two timestamp attributes and calculates the difference between them in milliseconds. Just divide by 10000 and that should work for you.

    Scott