Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
you can use
this function in the script
=time(MakeTime(InTime_Hrs,InTimeMins,0),'hh:mm')
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
];
Both are provided solutions are now working.
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
];