Link to home
Start Free TrialLog in
Avatar of 25112
25112

asked on

DATEDIFF -- dd vs yy

is
DATEDIFF(yy, COLUMN1, COLUMN2 ) <=1
exactly same as
DATEDIFF(dd, COLUMN1, COLUMN2 ) <=365)

DATEDIFF(yy, COLUMN1, COLUMN2 ) BETWEEN 1 and 2
exactly same as
DATEDIFF(dd, COLUMN1, COLUMN2 ) BETWEEN 366 and 730
ASKER CERTIFIED SOLUTION
Avatar of Rajkumar Gs
Rajkumar Gs
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 25112
25112

ASKER

so
SELECT DATEDIFF(yy, '2011/01/01', '2012/12/12' )
does not look days but only the year part?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 25112

ASKER

helped - thanks