Compare date

  • Hi guys.,

    I need to compare 2 different type of date first date format :

    2011 1

    2011 2

    2011 3

    second date format :

    July 2011

    June 2011

    April 2011

    March 2011

    February 2011

    compare the month if it's equal we need to display the data,Please share some example queries

    Thanks for advance

    Ranganathan Palanisamy

  • Are these char or (n)varchar fields? Or some other data type?

    -Ki

  • There are some in-built sql function available in sql server like say;

    DatePart, DateDiff and DateName which may help you out.

    Plz refere the syntax from MSDN of above function.

    Hope, it may be helpfull to u

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

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