Thanks . It goes through without an error so I guess it should work. It is still not getting the desired rows as now the SQL statement is expecting the ending numbers after seconds.
so how can I format Modified_Date so it is
Below is what I used before it is loaded into variable
Date(Modified_Date, 'YYYY-MM-DD hh:mm:ss') as Modified_Date