I have a PAD flow that executes a SQL statement against an existing Excel spreadsheet and then writes the results to another Excel spreadsheet. The flow itself runs without issue but I've noticed that the column that includes dates is converted from date to datetime when writing back to Excel, e.g., original date = 11/1/2023, write back date = 11/1/2023 12:00:00 AM. I would like to only write the date portion back to the new spreadsheet but haven't figured out what the SQL syntax is to do so, e.g., select trunc(column with date) from ...
Below is the SQL query in use. de.ELIGIBILITY_DATE is one example where I want the results to only be date, not datetime.
select
de.FIRST_NAME,
de.LAST_NAME,
de.ELIGIBILITY_DATE,
de.DEFERRED_FILE_AUDIT_DATE,
de.EMPLOYMENT_STATUS,
de.PROJECTED_SERVICE,
de.OPEN_WORKFLOW
from [Original$] de
where de.eligibility_date = #%DeferredDate[0][0]%#
My preference is to do all this in SQL so that I don't have to create a 'for each' loop to convert the date row by row as it's being written. Any suggestions on how I might go about doing this? Thanks!