Hi All,
Thank yo so much for your time. I have this scenario where i get the ETL loaddate and I convert it into EST - this is accomplished - no issue using the below
CAST(FROM_TZ(CAST(ETLLOAD.ETL_LOAD_DATE AS TIMESTAMP), 'UTC') at time zone 'America/New_York' AS Date) AS ETL_LOAD_DATE_EST
output of the above - each record will have a value that is either same or different by a min or 2 otherwise most of them will have the same value -
6/20/2023 12:30:29 PM
6/20/2023 12:31:38 PM
What is the next step that I need from the above is
- take the date part i.e 6/20/2023 add a constant timestamp which is 06:30:00 AM and also 09:30:00 AM
- then check if the value above is greater than 630 AM or greater than 930 AM then flag as 1 if it is greater or flag as 0 if it is not
- is it ok to do this is another new column - yes, using the above converted into est - use another new column - fine
6/20/2023 12:30:29 PM > 6/20/2023 06:30:00 AM or 6/20/2023 12:30:29 PM > 6/20/2023 09:30:00 AM
any suggestions - thanks a lot for your time