I am not sure about what do you intent. I think that the second column of the insert "must be" a date, and the YEAR(...) returns a integer, so a error succeds.
Please try to use:
INSERT INTO table_b(Price, Modified) <br />
SELECT SUM(price) as sales, convert(datetime,CONVERT(char(4),YEAR(Modified))+'-01-01T00:00:00') as Modified from table_a<br />
group by convert(datetime,CONVERT(char(4),YEAR(Modified))+'-01-01T00:00:00')<br />
order by 2
.
Explanation:
Year(Modified) return a int with the year of modified, but
CONVERT(char(4),YEAR(fecha)) converts this year a string (for example "2017").
Then
CONVERT(char(4),YEAR(Modified))+'-01-01T00:00:00', is a string that represents the first day of that year at the 0:00 hours (that is "2017-01-01T00:00:00".
For last
convert(datetime,CONVERT(char(4),YEAR(Modified))+'-01-01T00:00:00') converts that string to a datetime corresponding to the first day of the year.
(Note that kind of string aaaa-mm-ddThh:mm:ss doesn´t depends of the culture or idiom so always is interpreted correctly).