Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Also need help on the below.
I have the LoginTime and LogoutTime need to Generate the Hours between the time in the New Column.
For Example : Taking the highlighted LoginTime and LogOut time i.e. 10:45:23 to 13:14:49 , Need to generate following hours between them i.e. 10,11,12,13 .
| LoginTime | LogOutTime |
| 10:09:08 AM | 10:18:20 |
| 10:13:54 AM | 10:34:26 |
| 10:18:46 AM | 12:19:18 |
| 10:22:06 AM | 11:06:49 |
| 10:32:54 AM | 16:15:54 |
| 10:44:11 AM | 13:12:11 |
| 10:45:23 AM | 13:14:49 |
| 10:48:58 AM | 12:37:48 |
| 10:52:21 AM | 12:39:28 |
| 10:58:15 AM | 11:03:14 |
| 10:59:52 AM | 11:24:11 |
| 10:59:57 AM | 11:49:22 |
How can I generate new column containing Hours between the LoginTime and LogOut time ?
Regards,
Alvin.
Hi,
Attached, I send an example.
I hope will be helpful.
Best regards,
Ricardo
Hi,
A tip is to have a look at the IntervalMatch function,
br
Paul
Hi Paujoh,
Thanks for your reply. I have already tried. It will not generate the Hours between the LoginTime and LogOut time.
Regards,
Alvin.
Use interval function, assuming the data format is time:
interval (LogOutTime - LoginTime, 'hh')
Regards,
Michael
Hi Michael,
Thanks for your reply.
Interval only gives the difference. But I need to generate the hours between the LoginTime and LogOutTime.
For Example : Taking the highlighted LoginTime and LogOut time i.e. 10:45:23 to 13:14:49 , Need to generate following hours between them i.e. 10,11,12,13 .
Regards,
Alvin.
Hi,
Attached, I send an example.
I hope will be helpful.
Best regards,
Ricardo
Nice example Ricardo.
-Rob
Hi,
If i my understanding is correct you want to show the hours in a single row not in multiple rows.
I have attached a doc which gives you hours in a single row.
But you have to write the if clause for 24 hrs, which is a bit hectic.
Use if it is ok for you.
Regards,
yaseen
Hi,
Use chaining if clause for this case is not practical.
If you need to put the hours in a line, for my example, you can use the concat() function and gets the hours concatenated. See the script (qvw attached).
Regards,
Ricardo
Rows gets duplicated in your interval macth function? due to joins.