Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have incident creation time field in my data model and have a requirement that need to caculate SLA time remaing for each incident (here SLA time defined is 24 hrs for each incident once the incident is generated).
for example my idea is that need to add 24 hrs for each incident and then subtract incident creation time .
any suggestions will be highly appreciated.
Can you post sample data for creation time?
Hi @maheshkuttappa ,'
Please find the sample data below for your reference.
In above case for incident_creation Time I need to add exact 24 hrs for each incident I.e the output required 10/28/2023 5:29:51 PM (which means 24 hours SLA time for that incident after its created.
You use SLATime1 or SLATime 2 . I suggest storing SLA time as a variable.
T:
Load
*,
Timestamp(StartTime +'24:00:00','MM/DD/YYYY hh:mm:ss') as SLATime1,
Timestamp(StartTime +'1','MM/DD/YYYY hh:mm:ss') as SLATime2;
;
Load Date#(StartTime,'MM/DD/YYYY hh:mm:ss') as StartTime,
;
Load * Inline
[StartTime
10/28/2023 5:29:51];
Hi @maheshkuttappa ,
Thnks for the hint but here the start time in inline load should be dynamic for example it should add 24 hrs to the incident creation time .
You can add 1 day to your incident creation time field
Hi @anat ,
That is where I am struggling, I tried several syntax but that output of after adding 24 hrs is getting wrong
Timestamp(YourField+Time#(24,'hh'))
LOAD *,Timestamp(StartTime+1,'MM/DD/YYYY hh:mm:ss') as NF;
Load Date#(StartTime,'MM/DD/YYYY hh:mm:ss') as StartTime,
;
Load * Inline
[StartTime
10/27/2023 5:29:51
10/27/2023 5:45:51
];