I have the following code:

```
Declare @indDate date = '1/1/2014'

SELECT  RecordID AS RID,
            Name, 
            Company, 
            PhoneNumber, 
            CONVERT(VARCHAR(10),DateOfInduction,103) AS StartDate,
            CONVERT(VARCHAR(10),DateOfExpiry,103) AS DateOfExpiry
    FROM Records WHERE DateOfExpiry <= DATEFROMPARTS(DATEPART(YYYY,@indDate),DATEPART(MM,@indDate),DATEPART(DD,DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,@indDate)+1,0))))
    AND DateOfExpiry >= DATEFROMPARTS(DATEPART(YYYY,@indDate),DATEPART(MM,@indDate),1)

```

Which basically gives me all expiring records for the month of the `@indDate` parameter.

What I am trying to do is add 1 to the month in the DATEFROMPARTS to get next month's values. Now I don't want to just change the `@indDate` to the other month because in the report the date will not be selected but only something like Expires This Month, Next Month, Previous Month, etc.

So if I change the WHERE clause to: 

```
WHERE DateOfExpiry <= DATEFROMPARTS(DATEPART(YYYY,@indDate),DATEPART(MM,DATEADD(MM,1,@indDate)),DATEPART(DD,DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,@indDate)+1,0))))
    AND DateOfExpiry >= DATEFROMPARTS(DATEPART(YYYY,@indDate),DATEPART(MM,DATEADD(MM,1,@indDate)),1)

```

I get error: `Cannot construct data type date, some of the arguments have values which are not valid.` and I am not sure why, it works fine If I try something like:

```
Declare @indDate date = '1/1/2014'
select DATEADD(mm,1,@indDate)

```

Can anyone see the problem?