Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
SQL
select f.*,cd.c_cust_code,dwr.C_DSC_Code,isnull(MAX(dateadd(day,(dw.D_Date_Report),+1)),'2015/02/28') from t


Am getting error that
Msg 8116, Level 16, State 1, Line 1
Argument data type datetime is invalid for argument 2 of dateadd function.
Posted
Updated 19-Mar-15 19:51pm
v2
Comments
King Fisher 20-Mar-15 1:53am    
Format like "select DATEADD(interval,increment,date)"

1 solution

Check this:
SQL
select f.*,cd.c_cust_code,dwr.C_DSC_Code,isnull(MAX(dateadd(day,+1,dw.D_Date_Report)),'2015/02/28') from t


DATEADD function should format like below
SQL
select DATEADD(interval,increment,date)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900