I have a table which looks like this:
datestamp
2020-04-01
2020-04-02
I am trying to do two things:
- Convert datestamp to date format, because right now it's ABC
- Get difference between datestamp and the end of this year ( 2020-12-31 )
So that I would get a result like this:
datestamp diff
2020-04-01 275
2020-04-02 274
What I've tried:
DATEDIFF(day, datestamp, '2020-12-31 00:00:00.0000000')
I get:
DATEDIFF(day, datestamp, '2020-12-31 00:00:00.0000000')
Where is my mistake?