0

I am facing an issue while using presto date functions to get the current day and the previous day’s data.

“An error occurred while communicating with Presto. Bad Connection: Tableau could not connect to the data source. Error Code: 9F80FB23 [Simba][Presto] (1060) Presto Query Error: line 30:37: '>=' cannot be applied to varchar, date (1) [Simba][Presto] (1060) Presto Query Error: line 9:24: '>=' cannot be applied to varchar, date (1)”

Can you please help /suggest us to resolve it?

*where a.event_date <= current_date
*where a.event_date <= date 'current_date' - interval '1' day
Simas Joneliunas
  • 2,890
  • 20
  • 28
  • 35
Johnpaul
  • 11
  • 1
  • 1

1 Answers1

1

line 9:24: '>=' cannot be applied to varchar, date (1)

There is no >= in the query you provided, However, i am guessing event_date is a varchar column, so you want something like this:

CAST(a.event_date AS date) <= current_date - interval '1' day
Piotr Findeisen
  • 19,480
  • 2
  • 52
  • 82