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: 
Not applicable

Separating date and time


Hi,

I'm trying to report how many trucks in my dataset arrived on time. All trucks that arrive within half an hour after their booked time, or on time. To do this, I added the following line to my script:

  If([Vehicle arrival Time]-[Delivery DueTime]<=(1/48), 1,0) as [On time]

However, the dataset I receive from my carrier is a bit messed up.; under the header [Vehicle arrival time] in the excel file they made it look like with the cell format like they only put a time, but they also put a date there. So in stead of showing for example 0,3563,  the data in the cell is 41649,3563. Another problem is also that the data attached to the time is incorrect; they put the same data in every cell.

How do I adjust my script, so that it only takes the decimal spaces (so the time) into account, and not the data? Thanks in advance.

Best regards,

Niek

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

To get only the time and not date of [Vehicle arrival time], you can use:

frac([Vehicle arrival time])

Hope it helps

View solution in original post

1 Reply
Not applicable
Author

Hi,

To get only the time and not date of [Vehicle arrival time], you can use:

frac([Vehicle arrival time])

Hope it helps