Selecting multiple start and end time out of datetime column

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Leonzc
    New Member
    • Nov 2008
    • 1

    Selecting multiple start and end time out of datetime column

    hi guys, i am currently creating a sql select statement for my project. The project would create a log data every minute if the user is away from the work station, thus the log would pretty much look like

    Name DateTime
    Alvin 11/09/08 11:30:00AM
    Alvin 11/09/08 11:31:00AM
    Alvin 11/09/08 11:32:00AM
    Alvin 11/09/08 03:24:00AM
    Alvin 11/09/08 03:25:00AM

    I would need a select statement which could produce

    Name StartTime EndTime Interval
    Alvin 11:30:00AM 11:32:00AM 2
    Alvin 03:24:00AM 03:25:00AM 1

    could anyone help me with it?
    =)
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    kindly post the query that you are working on.

    Comment

    Working...