I am having a problem using sqlexport in fluidshell. I am currently using a Teradata Database but I have had the same issue with Iseries. I can’t seem to get the excel file to export a date field without the time. The closest I have been able to come is using the format function but it creates issues when I try to sort it in excel. Is there a setting that I can change or another function that I can try to get only the date to export as a date field?
Here is the Fluidshell that I am trying. I’ve also enclosed examples of what the export looks like in Excel and the Query Analyzer.
\cli sql
SELECT
CALENDAR.calendar_date,
CAST(CALENDAR.calendar_date AS DATE) AS “CAST”,
TRUNC(CALENDAR.calendar_date) AS “TRUNC”, CAST(CAST(CALENDAR.calendar_date AS DATE format ‘MM/DD/YYYY’) AS CHAR(10)) AS “FORMAT”
FROM Sys_Calendar.CALENDAR CALENDAR
WHERE (CALENDAR.calendar_date = CURRENT_DATE)
\sqlexport -f excel2007 -d PRD_SAA_SCREPORT_PII -o C:/Users/Desktop/Results/DATE_TEST.xlsx
Thanks
Gregg
Response
Jenny Nishimura over 6 years ago
We are able to reproduce the problem and have logged issue #15211. We are looking into fixing this problem.