Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

CONVERTING TIMESTAMP TO SHOW WORKSHIFT

Good day

 

I have a field called EDITDATE that is in a timestamp format. I used the following code to give me a field that shows day or nightshift within my table but it does not work. I have changed my format to show hh:mm only but still it recognises the field as the wrong format.

When I view the table it shows 'NIGHT SHIFT' which it should return when the return expression is false.

PLEASE HELP??????1.jpg

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Have you tried something like

if( frac(EDITDATE)>= maketime(6) and frac(EDITDATE) <= maketime(18), 'DAY SHIFT', 'NIGHT SHIFT') as SHIFT

View solution in original post

2 Replies
swuehl
MVP
MVP

Have you tried something like

if( frac(EDITDATE)>= maketime(6) and frac(EDITDATE) <= maketime(18), 'DAY SHIFT', 'NIGHT SHIFT') as SHIFT

Not applicable
Author

I have inserted your script and it works fine.....

Thanx a million buddy

Kind regards

Hein.SNJ