Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Qlikview Community,
Below is an image of a table containing events occuing during a shift. I have a start time and an end time for the shift but I am trying to convert the fields "StartOffset" and "StopOffset" into time. I've used the MakeTime function along with the floor function to create time but that off set represented minutes from midnight (0 = 12:00:00 AM). I thought I could maybe use the same approach but instead using the ShiftStartTime as my floored time. Didnt work. Any assistance with this would be much appreciated.
Thank you
Hi VilleGasi
What is the result you are expecting? In the first line, would you expect the EventStartTime to be 11am and end time to be 1pm? Also, are you doing this in the script?
You can use the maketime(hr,min,s) function to convert the start and end offsets into minutes, and add them to the shift start.
eg
eventstarttime=SHIFTSTARTTIME + maketime(0,StartOffset,0)
This may format to a float (decimal), if this happens use the time() function to correct it back to a
eventstarttime=time( SHIFTSTARTTIME + maketime(0,StartOffset,0) )
Let me know if this is what you need.
Regards,
Erica