Home Forums SQL Server 2005 T-SQL (SS2K5) Date Conversion Fails in Stored Procedure - But code works in a Trigger !? RE: Date Conversion Fails in Stored Procedure - But code works in a Trigger !?

  • Phil Parkin (5/7/2013)


    Why not avoid the datatype conversions completely?

    declare @Today date

    declare @NowTime time

    select @Today = getdate()

    ,@NowTime = getdate()

    select @Today

    ,@NowTime

    Sorry but the TIME Data Type is only on SQL 2008 - not on SQL 2005

    ________________________________________________________________________________________________
    Regards
    Steve
    SQL 2008 DBA/DBD - MCTS/MCITP

    Please don't trust me, test the solutions I give you before using them.