Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

How to combine the break time intervals into continues time period?

User_8XMDDJul 18 2022

Hi All,
This is my input data. Here the 1st logout time is equal to 2nd login time.
LogInTime LogOutTime
4/15/2022 15:32 4/15/2022 16:28
4/15/2022 16:28 4/15/2022 16:58
4/15/2022 16:58 4/15/2022 17:20---> Break Time
4/15/2022 17:20 4/15/2022 18:42
4/15/2022 18:42 4/15/2022 19:13
4/15/2022 19:13 4/15/2022 22:56

I want to combine the data like this,
4/15/2022 15:32 4/15/2022 16:58
4/15/2022 16:58 4/15/2022 17:20---> Break Time
4/15/2022 17:20 4/15/2022 22:56

And i need a one more column which as Total Login Time (in seconds) for adding up the combined time intervals.

Thanks in advance.

This post has been answered by BluShadow on Jul 18 2022
Jump to Answer
Comments
Post Details
Added on Jul 18 2022
14 comments
192 views