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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
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

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

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
Champion III
Champion III

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