the intime and outtime are in columns , but i need them likeI want it like this
I believe you are going to need to use the PIVOT operator. Here is another question similar to yours that has been answered.
Noel