• Hi 5409045121009,

    I tried the function you mentioned, and modified it a little so that it gave me the whole string and it worked.

    CREATE FUNCTION MyStrip1(@v varchar(50)) RETURNS Varchar(50) AS

    BEGIN

    Declare @vv Varchar(50)

    Set @vv=Right(@v,DataLength(@v))

    RETURN Left(@vv,DataLength(@vv))

    END

    Problem though is that it is returning it as a varchar value. I need to return it as a datetime value. Is it true that you can only cast/convert to a datetime value type if the string you're converting from is in one of the accepted datetime formats (alphabetic, numeric, odbc, time, unseparated string - from BOL)?