I am trying to subtract 1 millisecond from the update time (existing timestamp in dd-MMM-yy hh.mm.ss.MS format but I am getting null when I write -1. Please help. Below is my query in which I need to subtract 1 from the result I get by the lead of update time.
I tried this
nvl( lead(updatetime) over (partition by id order by updatetime asc)-1, now()) DW_END_DATE_TIME
Does not work. I am new to hive, I have no idea why this is not working.