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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
lalitkgehlot89
Partner - Creator II
Partner - Creator II

Need logic help related to time.

Hi,

In given data i want to subtract 5:30 hours from the In-Time and Out-Time both.

and for example time in/out time is 2:30 then output time should be 21:00 . and date should not be changed.

Please help me out asap.

Regards,

Lalit kumar

9 Replies
maxgro
MVP
MVP

Directory;

LOAD [Employee Code],

     [Employee Name],

     Date,

     [In-Time],

     Time([In-Time] + 11/48, 'hh:mm') as [Out-Time]

FROM

[HR time.xlsx]

(ooxml, embedded labels, table is [HR time]);

Anil_Babu_Samineni

Like this

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anil_Babu_Samineni

Max,

Correct me if i am wrong. He is asking about Subtraction.

Might be this

Time([In-Time] - 11/48, 'hh:mm')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
maxgro
MVP
MVP

You're right, he said subtraction

Anil_Babu_Samineni

If we write like

[In-Line] - '05:30' and then in number tab we just change that radio button to Time with the format of hh:mm

This is Correct? Because, i did same thing only with the below attachment

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
lalitkgehlot89
Partner - Creator II
Partner - Creator II
Author

Thanks a lot Anil.

Anil_Babu_Samineni

Please close this Thread if you resolve the issue. Please flag the Correct Answer who was the Correct

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tyagishaila
Specialist
Specialist

Time( [In-Time] - '05:30' , 'hh:mm')

lalitkgehlot89
Partner - Creator II
Partner - Creator II
Author

Hi,

Here i am facing one issue.

When i am exporting data in excel it is coming in decimal format.

and exporting data in csv is ok.

Please suggest me what changes i have to do to get the exact data in excel.


Regards,

Lalit Kumar