FINDING THE DATE WHICH IS NEAREST TO CURRENT DATE

  • i need to find the date from a column , which is less than and is nearest to the current date .??

    any help would be appreciated

  • With no sample(s) of your current data all I can suggest is that you look at using the built in function GETDATE.

    For example:

    SELECT GETDATE() executing this just a minute or two before typing this reply returns

    2014-02-02 21:26:48.880

    year -month-day hour:minute:seconds:milliseconds

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • This is a double-post... here's the original

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

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