Hi,
I am using sql query in synapse notebook and unable to use getdate() function in sql query. Please advice.
this query not working
df= spark.sql("""SELECT period_id FROM dim_period_dates
WHERE
GetDate() -1 BETWEEN period_start AND period_end """).
this query is working
df= spark.sql("""SELECT period_id FROM dim_period_dates
WHERE
date_sub(Current_Date(),1) BETWEEN period_start AND period_end
""")