Finding New Years Eve

  • Toreador (1/9/2013)


    DavidBridgeTechnology.com (1/9/2013)


    When is New Years Eve anyway?

    February 9th 😉

    Ha Ha.:-P

    David Bridge
    David Bridge Technology Limited
    www.davidbridgetechnology.com

  • -- In 2008 + you can use a date instead of a datetime with implicit conversion

    DECLARE @Date date = GETDATE()

    SELECT DATEADD(DAY, -DATEPART(dayofyear,@Date),@Date)

    David Bridge
    David Bridge Technology Limited
    www.davidbridgetechnology.com

  • DavidBridgeTechnology.com (1/9/2013)


    Whilst others are being picky I thought I would add my bit.

    None of the answers are right

    When is New Years Eve anyway?

    If its January 9th (as it is today) then New years eve this year will be 31-12-2013.

    31-12-2012 was new years eve LAST YEAR

    Very picky I know but I think technically correct

    Dave

    Correct, the original question didn't explicitly state whether it should return New Years Eve for this year or last, but the correct answer implied that it should be last years (2012/12/31)

Viewing 3 posts - 46 through 47 (of 47 total)

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