How to find timestamp of an event with specific time interval

Using sparksql how to code an timestamp of interval in an event.