How do I get Data Table to recognize dates uploaded by Data Shuttle?
Hi, I'm trying to create a new Data Table using Data Shuttle. I have some columns with date date. It seems that, no matter how I format the dates in the source CSV, Data Table won't recognize them as dates.
Data Shuttle doesn't have an option to set the date format when creating a Data Table. I wish it would.
I know I can then go into Data Table and change the Date type once the table is created, and then it will recognize the dates in whatever format I've uploaded. But I'd like to skip that step as there's many date fields.
I've tried: MM-DD-YYYY , YYYY-MM-DD, MM/DD/YYYY, MM/DD/YY, and YYYY-MM-DD 01:00:00.000 but nothing seems to register. Any ideas, or am I stuck with editing the date fields after creation?
Best Answer
-
Brian_Richardson Overachievers
Never mind, I found the solution. If you import dates in the format YYYY-MM-DDT00:00:00Z then Data Table will recognize that format as a date. I also tested syncing to a Sheet and the sheet recognizes that as a date and displays it correctly based on regional setting (mine being MM/DD/YY)
Answers
-
Brian_Richardson Overachievers
Never mind, I found the solution. If you import dates in the format YYYY-MM-DDT00:00:00Z then Data Table will recognize that format as a date. I also tested syncing to a Sheet and the sheet recognizes that as a date and displays it correctly based on regional setting (mine being MM/DD/YY)
-
Danielle Wilson Employee
Sorry I missed you the other day when you were talking to Grace! I poked into this question with the Product Manager for DataTable and we confirmed that the one date format that is supported by default is yyyy-mm-ddThh:MM:ssZ as you called out. If you change the format of the date to yyyy-mm-dd specially in the "Settings" for that date field, that will also work as a recognized date format!
Your suggestion to put in some guidance to our help documentation is a good one, so we'll work on dropping something into a help article.
Best!
Danielle Wilson
Product Marketing Manager
Smartsheet
Danielle W.
Product Marketing
Smartsheet
-
Brian_Richardson Overachievers
Hi@Danielle Wilsonsorry I missed you too!
Couple of suggestions related to this:
1) It would be wonderful if DataTable could understand more date formats. There's some common ones like MM/DD/YYYY and YYYY-MM-DD (Smartsheet default), ISO/UTC, and Unix epoch that a lot of tools can produce for importing. Having to use a slightly odd format of YYYY-MM-DDTHH:MM:SSZ adds data transformation steps that aren't really necessary or value-add when trying to just load your DataTable.
2) Related - Data Shuttle should allow date format to be set when creating a DataTable or uploading data. It allows selection of "Date" as a field type, but not the format, so unless the date is in the YYYY-MM-DDTHH:MM:SSZ format already in the source data, you're out of luck and have to adjust the DataTable fields by hand afterward. Which would be ok for a couple, but I have 20 and can imagine even larger tables with 50-100 date fields to manage.
3)桥应该能够说到数据表,it would help with pushing changes in rather than having to jump through hoops to get a file out, then shuttle in. Because we'd typically need to process bulk data into DataTable, the API would need to have ability to POST a JSON formatted body with objects, similar to Add Rows, which could be pieced together by Javascript.
4) If Bridge will speak to Data Table, you also should update the Compose Date/Time and Parse Date/Time to provide a result in the format that Data Table is looking for (YYYY-MM-DDTHH:MM:SSZ). Currently they don't produce this format.
(while we're on this topic - if the "checkbox" field could understand yes/no, and if the "number" field could understand to strip currency symbols and commas, that would also greatly streamline the process of loading DataTable and using it)
-
Danielle Wilson Employee
@Brian_RichardsonThank you for all of the wonderful feedback! I've been digging into this even more this week and found a few more little odd complexities that I'm going to try to work into our Help page documentation - including a few of the ones you outlined! I passed along your feedback to the DataTable and Bridge teams and definitely have a better sense of how some of the date formatting works, so let me know if you have any other questions on this front before we get the documentation updated. :)
Danielle W.
Product Marketing
Smartsheet
-
uwft ✭✭
Hi@Brian_Richardsonand@Danielle Wilson, I am trying to test this from above...
"Data Table is looking for (YYYY-MM-DDTHH:MM:SSZ)"
I have a Google Drive sheet with data like:
12/18/22 20:19:38
The Google Drive sheet datatable column is set to YYYY-MM-DD.
Google Drive works, although it appears there may be invisible date formatting happening there.
I have a sharepoint csv blob with data like:
12/18/22 20:19:38
The SharePoint CSV's datable "column" ... I have tried YYYY-MM-DD and many others.
The SharePoint CSV doesn't work. DataShuttle can parse it by semicolon separators, but the date as text in this format is not seen as
texta date value, no matter the target DataTable field format.Is there a way to "wrap" or further format the date values I'm misunderstanding?
-
Brian_Richardson Overachievers
@uwftif you need the time in there, I think you'll need to ensure the text in your Sharepoint CSV file follows exactly with YYYY-MM-DDTHH:MM:SSZ format. Can you add a field in Sharepoint that uses some formulas to convert your date and time to that format? From 12/18/22 20:19:38 you need to reformat it to "2022-12-18T20:19:38Z"
On the Data Shuttle side, when importing to Data Table, be sure to set the field as a Date field. You cannot pick the format in Data Shuttle.
On the Data Table side, it should see that format as a Date type field, and you shouldn't need to adjust the format.
If instead you're trying to import data that looks like 12/18/22 20:19:38 I don't think you'll be successful in getting DataTable to recognize that as a date. In DataTable you can set the fields to different date formats by opening the table, clicking Settings, and Edit. However you'll notice that the various format options don't include time, except for one - the YYYY-MM-DDTHH:MM:SSZ format. So if your data includes time information, that's your only option for getting DataTable to recognize it.
It's frustrating I know - and Danielle is aware also (Danielle is a Product Mgr for Smartsheet).
-
uwft ✭✭
Thanks,@Brian_Richardson- I wasn't able to get it working with time so changed to YYYY-MM-DD and possibly even rebuilt a datatable or two to essentially run the date column "the right way" from the start.
Along the way, I found what Smartsheet determined a bug where a date column with a blank cell value in DataTable appeared to be overlooked or even considered as "Today," that they are working on. I went through my datatable and manually deleted 8000 such rows which resolved it for me.
Sharing is caring. Thanks!
Categories
I tested this with Source as Box and as Excel attachments and blank values now update!!<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":343,"name":"Add Ons and Integrations","url":"https:\/\/community.smartsheet.com\/categories\/apps-and-integrations","allowedDiscussionTypes":["discussion","question"]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":474,"urlcode":"data-shuttle","name":"Data Shuttle"}]},{"discussionID":112131,"type":"question","name":"How to get filters in Workapp page settings?","excerpt":"Hi, I want to filter a workapp to only show filters rows to a viewer. How do I get filters to show up in this section? I have put filters in the source sheet and the sheet view in workapp but nothing show in the filter section. Thanks you","snippet":"Hi, I want to filter a workapp to only show filters rows to a viewer. How do I get filters to show up in this section? I have put filters in the source sheet and the sheet view in…","categoryID":343,"dateInserted":"2023-10-25T14:52:14+00:00","dateUpdated":null,"dateLastComment":"2023-10-27T16:15:04+00:00","insertUserID":144572,"insertUser":{"userID":144572,"name":"Kimbh","url":"https:\/\/community.smartsheet.com\/profile\/Kimbh","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-10-27T19:01:48+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"},"updateUserID":null,"lastUserID":144572,"lastUser":{"userID":144572,"name":"Kimbh","url":"https:\/\/community.smartsheet.com\/profile\/Kimbh","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-10-27T19:01:48+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":31,"score":null,"hot":3396670038,"url":"https:\/\/community.smartsheet.com\/discussion\/112131\/how-to-get-filters-in-workapp-page-settings","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/112131\/how-to-get-filters-in-workapp-page-settings","format":"Rich","tagIDs":[371],"lastPost":{"discussionID":112131,"commentID":402041,"name":"Re: How to get filters in Workapp page settings?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/402041#Comment_402041","dateInserted":"2023-10-27T16:15:04+00:00","insertUserID":144572,"insertUser":{"userID":144572,"name":"Kimbh","url":"https:\/\/community.smartsheet.com\/profile\/Kimbh","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-10-27T19:01:48+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Add Ons and Integrations","url":"https:\/\/community.smartsheet.com\/categories\/apps-and-integrations"}],"groupID":null,"statusID":3,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/EUVA1SS8M0SA\/workapp-10-25-2023.png","urlSrcSet":{"10":"https:\/\/us.v-cdn.net\/cdn-cgi\/image\/fit=scale-down,width=10\/https:\/\/us.v-cdn.net\/6031209\/uploads\/EUVA1SS8M0SA\/workapp-10-25-2023.png","300":"https:\/\/us.v-cdn.net\/cdn-cgi\/image\/fit=scale-down,width=300\/https:\/\/us.v-cdn.net\/6031209\/uploads\/EUVA1SS8M0SA\/workapp-10-25-2023.png","800":"https:\/\/us.v-cdn.net\/cdn-cgi\/image\/fit=scale-down,width=800\/https:\/\/us.v-cdn.net\/6031209\/uploads\/EUVA1SS8M0SA\/workapp-10-25-2023.png","1200":"https:\/\/us.v-cdn.net\/cdn-cgi\/image\/fit=scale-down,width=1200\/https:\/\/us.v-cdn.net\/6031209\/uploads\/EUVA1SS8M0SA\/workapp-10-25-2023.png","1600":"https:\/\/us.v-cdn.net\/cdn-cgi\/image\/fit=scale-down,width=1600\/https:\/\/us.v-cdn.net\/6031209\/uploads\/EUVA1SS8M0SA\/workapp-10-25-2023.png"},"alt":"WorkApp 10 25 2023.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-10-27T16:19:48+00:00","dateAnswered":"2023-10-27T14:00:51+00:00","acceptedAnswers":[{"commentID":402014,"body":"