# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

## Shift Calculation

Hi All,

I have a time field in my table and with that i need to create a shift dimension with 2 values: Day or Night.

If the time field falls between 6:30AM to 6:30PM then its a day shift if between 6:30PM to 6:30AM then night shift.

Time field is in the format DD-MM-YYYY HH:MMS

Thanks!

2 Replies
MVP

## Re: Shift Calculation

Maybe something like :

if (      frac(YourTimeField) > maketime ( 06 , 30 )

and

frac(YourTimeField) < maketime ( 18 , 30 )

, 'Day' , 'Night' )

Luminary

## Re: Shift Calculation

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others