On Mon, Jan 24, 2011 at 4:54 AM, The Master Mind <[email protected]> wrote: > > hii > select datediff(month , '2010/12/14' , '2011/01/01') gives 1 month as > date difference > select datediff(day, '2010/12/14' , '2011/01/01') gives 18 days as date > difference > select datediff(year, '2010/12/14' , '2011/01/01') gives 1year as date > difference > kindly do help to find out the perfect datediff ----------------
Please define perfect? You are getting the proper results. The difference in years between 2010 and 2011 is 1, same goes for Month. That is the parameter you are asking for correct? This quote is from M$: Returns the count (signed integer) of the specified datepart boundaries crossed between the specified startdate and enddate. -- Stephen Russell Sr. Production Systems Programmer CIMSgts 901.246-0159 cell
