pepevo
New Contributor III

I have been tried many data functions to compare with sysdate and no luck even with 10 records in a table. Is there a way I can compare sysdate as decimal?

even using, unix_timestamp, from_unixtime and none of them work.

Why scala sql is not friendly much. what would the following where clause look like in databricks:

WHERE to_date(trunc(load_dt_id),'yyyymmdd') = trunc(sysdate -1);

I tried "trunc(cast(load_dt_id as string),'yyyyMMdd') = date_format(date_sub(currentl_date(),1),'yyyyMMdd') ; "

or "

trunc(cast(load_dt_id as string),'yyyyMMdd') = trunc(date_sub(currentl_date(),1),'yyyyMMdd');

"

none of them are working