Avatar

Level 1

I think so you need to use the Time functionality instead of currentDate and last Modified date. 

It might be both the currentDate and ModifiedDate are same i.e. of today because of which you might be receiving an error.