in reply to Time:Piece help

I am changing the days with hms, but it is giving me the error.

What do you mean by this? Show code.

error: Can't call method "hms" on an undefined value at timediff line 7.

I don't see a line 7 in your code. What are you calling "hms" on? Show code.