How To Separate Data Into Two Columns [duplicate]
This question already has an answer here: Attendance IN and OUT 3 answers Consider the following table structure and sample data - EmpID InputDateTime StatusINOUT ------------------------------------- 1 2018-05-26 08:44 1 1 2018-05-26 08:44 2 2 2018-05-28 08:44 1 2 2018-05-28 12:44 2 1 2018-05-21 08:44 1 1 2018-05-21 10:44 2 2 2018-05-23 08:44 1 2 2018-05-23 08:44 2 Now I want to separate column InputDateTime into two columns i.e., INTIME(1) and OUTTIME(2) . The logic behind this is the date for which StatusInOut is 1 will be InTime and for StatusInOut is 2 that date value will be OUTTIME(2) .