I want to select all records between two timestamps using timestampadd to define the interval:
so select records between date X and date X + 90 days
I was hoping this would work (in PyMapd), but it doesnt…
“SELECT * FROM test1 WHERE datetimeinput between ‘2017-01-01:09:00:00’ and TIMESTAMPADD(DAY, 90, ‘2017-01-01:09:00:00’)”
It doesnt seem to like the 3rd argument to TIMESTAMPADD - expecting a datetime not a char?
This however works fine
“SELECT * FROM test1 WHERE datetimeinput between ‘2017-01-01:09:00:00’ and ‘2017-03-01:09:00:00’”
Can anyone help?
Thanks in advance