• not sure what you can do yet;

    two of the values cannot be directly converted to TIME datatype (the zero and negative values)

    msdn says the possible values for TIME datatypes are from 00:00:00.0000000 through 23:59:59.9999999

    so no negatives allowed.

    With MyCTE (vartime)

    AS

    (

    --SELECT '0' UNION ALL

    SELECT '02:19' UNION ALL

    --SELECT '-03:06' UNION ALL

    SELECT '00:22' UNION ALL

    SELECT '00:39'

    )

    select convert(time,vartime) as newtime

    from MyCTE order by 1

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!