none
T-sql equivalent of ROUNDDOWN in Excel RRS feed

  • Question

  • Hello friends,
    I am migrating over Excel Macros and Reports in SQL services.....

    There is a column in the legacy excel report which contains the following code
    Rounddown([date],0)

    The code converts 15/03/2009 to 39887.

    Any idea what this logic is trying to do ??  Sorry if my ques seems too silly  :-(

    Thanks a bunch ! Sweta
    Wednesday, March 18, 2009 5:28 PM

Answers

  • I think I would not need an equivalent of ROUNDDOWN for generating my reports in T-SQL
    Thanks a bunch ! Sweta
    • Marked as answer by Sweta Dutta Wednesday, March 25, 2009 12:15 PM
    Wednesday, March 25, 2009 12:15 PM

All replies

  • I am not sure that I understand what you really want; you might try

    cast(floor(cast(date as float)) as datetime)

    Sorry if I am missing the mark oin this.
    Wednesday, March 18, 2009 5:50 PM
    Moderator
  • I think I would not need an equivalent of ROUNDDOWN for generating my reports in T-SQL
    Thanks a bunch ! Sweta
    • Marked as answer by Sweta Dutta Wednesday, March 25, 2009 12:15 PM
    Wednesday, March 25, 2009 12:15 PM