Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a timestamp from which I have to subtract minutes.
LOAD Timestamp#(TAMPER_DUR,'mm')as TimeMinutes,
Timestamp#(REC_DATETIME,'MM-DD-YYYY hh.mm.ss')as RecoveryDate,
Interval#( Timestamp#(REC_DATETIME,'MM-DD-YYYY hh.mm.ss')- Timestamp#(TAMPER_DUR,'mm'),'MM-DD-YYYY hh.mm.ss') as TimeInterval_Date;
I am not getting correct answer with this.
Thanks
Asmita
try this:
Interval( Timestamp#(REC_DATETIME,'MM-DD-YYYY hh.mm.ss')-
Timestamp#(TAMPER_DUR,'mm'),'MM-DD-YYYY hh.mm.ss') as TimeInterval_Date;
//remove '#' from interval
Thanks Tresesco,but its not working.
I figured out the following script and it is working for me
LOAD REC_DATETIME,
`TAMPER_DUR`,
timestamp(`REC_DATETIME`-Time#(TAMPER_DUR,'mm')) as TimeInterval;
How is the data in TAMPER_DUR? I mean format.
It is in minutes.
Ex: Tamper_DUR
7
8
See,
=Timestamp(Today()-time#(10,'mm')) works fine to give right answer. Can you share a small sample app?
Data is as follows:
REC_DATETIME Tamper_DUR
7/15/2013 12:32:00 PM 3
7/15/2013 12:45:00 PM 7
7/15/2013 1:02:00 PM 6
PFA