CSV DateTime Export
See original GitHub issueWhen doing a CSV export, datetime columns do not export properly. Run this query:
SELECT CAST('2017-09-18' AS DateTime) AS FIRST,
CAST('2017-09-18' AS DateTime) AS SECOND,
CAST('2017-09-18' AS DateTime) AS LAST
CSV gets exported like:
FIRST,SECOND,LAST
1505692800000,1505692800000,2017-09-18T00:00:00.000Z
DateTime fields will only be exported properly if it is the last column. JSON works as expected:
[
{
"FIRST": "2017-09-18T00:00:00.000Z",
"SECOND": "2017-09-18T00:00:00.000Z",
"LAST": "2017-09-18T00:00:00.000Z"
}
]
Version: 1.20.2 DB: MSSQL
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Exporting Date/Time fields via Export Data results in extra ...
Select the Export Data button on the toolbar. Select several fields, including the date/time fields.
Read more >Formatting Dates for CSV Imports - Administration - Echo360
Basic steps: select the date column, right-click and select Format Cells, then select Custom and enter yyyy-mm-dd in the text field. Open the...
Read more >Export Data from Dataverse Table (CSV) DateTime Co...
I have been exporting data from a dataverse table and a datetime column in Excel is a different data type. Some records are...
Read more >Handling datetime from exported csv file - - MathWorks
I have both of my account profile and channel export time zones set to "(GMT+8000)Beijing". The datetime from the exported feeds.csv looks like:...
Read more >MS Access export query with DateTime extended field to csv ...
Csv can't store a date variable, it will be a string.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
i’m using MSSQL and also i tested on master branch. Looks like all looking fine on mine.
FIRST,SECOND,LAST 2017-09-18T00:00:00.000Z,2017-09-18T00:00:00.000Z,2017-09-18T00:00:00.000Z
[ { "FIRST": "2017-09-18T00:00:00.000Z", "SECOND": "2017-09-18T00:00:00.000Z", "LAST": "2017-09-18T00:00:00.000Z" } ]
I tested with the latest release and this issue has been resolved.
Thank you,