I am trying to set up a PDT to run on Sunday at 10:00PM (PST).
I thought of using this code:
select dateadd(‘hour’,22,date_trunc(‘WEEK’,(current_date + interval ‘1 day’))- interval ‘1 day’)
But this will still update the table once a day at midnight. Any ideas on how to set this up? Should I convert to unix? Please note that the sql database I am using is Redshift.