convert into second

  • Can you please help me converting datediff into seconds. I'm using SQL 2008 , the following command error out with pass valid argument.

    round((ENDDTTM - BEGINDTTM) * 24 * 60 * 60) || ' seconds' as PROCSTIME .

    Thank you

  • kshatriya24 (6/13/2013)


    Can you please help me converting datediff into seconds. I'm using SQL 2008 , the following command error out with pass valid argument.

    round((ENDDTTM - BEGINDTTM) * 24 * 60 * 60) || ' seconds' as PROCSTIME .

    Thank you

    SELECT DATEDIFF(SECOND, BEGINDTTM, ENDDTTM) from YourTable;

  • Thank you. it worked.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply