Click here to Skip to main content
15,560,600 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have a excel having multiple rows of data like user id, name, start time and end time.
i want to split the data into 2 tables using C# code like:
1. i need 1 table with user id, name, start time
2. 2nd table with user id, name, end time
User ID	Name	Date	start	             end	       first? last?	logic
111	David	11/18/2022	2022-11-18 07:36  2022-09-15 07:45 first   No   first
112	Leo	11/18/2022	2022-11-18 07:46	2022-09-15 07:46	No	  last	last
112	Leo	11/18/2022	2022-11-18 08:34	2022-09-15 08:34	first last	both


Note: first refers to start time
last refers to end time
logic refers having both start and end times.

What I have tried:

tried using pivot tables in excel
Posted
Updated 18-Nov-22 7:54am
v2
Comments
Gerry Schmitz 18-Nov-22 21:34pm    
One table; 2 views (LINQ queries).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900