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

Time from 2 field

Hello All,

I am having 2 fields in my data set which include time. I want to have 2 fields clubbed in one and want to use the newly created field with many function like sum, average and various other set analysis. Below is the example of data set.

EE_No, InTime_Hrs_InTimeMins

1, 09, 30

2, 11, 45

3, 08, 25

I want to have result like this

EMP 1 login time is 09:30 AM (timeformat with be 24 hrs)

Thanks in advance.

Regards,

Imran Khan

4 Replies
lironbaram
Partner - Master III
Partner - Master III

you can use

this function in the script

=time(MakeTime(InTime_Hrs,InTimeMins,0),'hh:mm')

MK_QSL
MVP
MVP

Data:

Load

  *,

  Time#(InTime_Hrs & ':' & InTime_Mins,'hh:mm') as InTime

Inline

[

  EE_No, InTime_Hrs, InTime_Mins 

  1, 09, 30

  2, 11, 45

  3, 08, 25

];

Anonymous
Not applicable
Author

Both are provided solutions are now working.

swuehl
MVP
MVP

1) Both provided solutions are now working.

or

2) Both provided solutions are not working.

?

Just asking because the emoticon doesn't match version 1).

If it's working, please close this thread by selecting above answers as helpful or correct.

If it's not working, please detail your issue (what makes you think it's not working).

If you want your required text field:

Data:

LOAD *,

     'EMP ' & EE_No & ' login time is ' & time(InTime,'hh:mm TT') & ' (timeformat with be 24 hrs)' as YourText;

Load

  *,

  Time#(InTime_Hrs & ':' & InTime_Mins,'hh:mm') as InTime

Inline

[

  EE_No, InTime_Hrs, InTime_Mins

  1, 09, 30

  2, 11, 45

  3, 08, 25

];