Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
fkeuroglian
Partner - Master
Partner - Master

SUM Time elapse to create a time field in script

Hi expert i would like to know if i can create a field that would be the sum between one time and the minutes that have elapsed

for example:

TIME: 12:00 AM,

TIME ELAPSED: 5MINUTES

I want to create a new field in the script that will be FINALTIME: 12:05 AM

could be?

attached a qvw and qvd for example and an image

thank you a lot

Fernando K.

1 Solution

Accepted Solutions
maxgro
MVP
MVP

maybe just add a format as time in number tab

your number 0,0039583333.... in first row, formatted as time is 12:05:42 AM;   05:42 seconds after midnight

1.png

View solution in original post

6 Replies
maxgro
MVP
MVP

1 is 1 day --> 24 hours

5 min are    5 / (24*60)

then add

Hora_EnSalida + TiempoAparc./(24*60)

1.png

Not applicable

Frac(Hora_EnSalida)+Frac(Time#(TiempoAparc.,'mm'))

fkeuroglian
Partner - Master
Partner - Master
Author

Thank you a lot SC , but i create in the script and in the object and get another format

see the attached if you could, please

Fernando

fkeuroglian
Partner - Master
Partner - Master
Author

Thank Maximo for your help, but i create in the script as you said and in the object too and get another format

see this if you could, thank you  a lot

Fernando

maxgro
MVP
MVP

maybe just add a format as time in number tab

your number 0,0039583333.... in first row, formatted as time is 12:05:42 AM;   05:42 seconds after midnight

1.png

MarcoWedel

Hi,

one solution could be:

QlikCommunity_Thread_196558_Pic1.JPG

LOAD *,

     Time(Frac(FinalTimestamp)) as FinalTime;

LOAD *,

     Timestamp(Fecha_EnSalidas+Hora_EnSalida+TiempoAparc.*'00:01') as FinalTimestamp

FROM [https://community.qlik.com/servlet/JiveServlet/download/933828-201995/Skidata_EnSalidaTest.qvd](qvd)...

If your initial time and final time span over more than one day, you have to only take the fractional part. Maybe you also need the resulting timestamp.

hope this helps

regards

Marco