DATEDIFF should compute the difference by arithmetic subtracting M/Y in month case, if I'm not wrong
ex: DateDiff (month, 1-1-2007, 3-30-2007) will return 2 Its that right ? A good reference for trying implementing it should be: http://www.sqlteam.com/article/datediff-function-demystified On Jan 17, 2008 6:12 PM, <[EMAIL PROTECTED]> wrote: > "Fowler, Jeff" <[EMAIL PROTECTED]> wrote: > > Yes - I've looked over the current date functions. I would propose a > > single function addition that's hugely valuable in the business world. > > SQL Server has a function called "datediff" for date arithmetic. It > > accepts three parameters. The first indicates the unit of scale (years, > > months, weeks, days, etc. - I think it even goes into milliseconds!). > > The next two parameters are the dates to compute the difference between. > > It returns an integer. > > > > Fair enough, and simple enough to do for weeks, days, and smaller > intervals. But what algorithm do I use to compute the number of > months difference? Or years? Is there a standard for such a > thing? Anybody know? > > -- > D. Richard Hipp <[EMAIL PROTECTED]> > > > > ----------------------------------------------------------------------------- > To unsubscribe, send email to [EMAIL PROTECTED] > > ----------------------------------------------------------------------------- > >