I've queried a Google sheet to use with retool as my datasource.
The date column includes timestamps, but I want to filter them out. This is so I can group by dates. For instance, I have 15 records on January 1, 2023 but since there are timestamps, then all 15 records show on a bar chart. I want all records from January 1, 2023 to show on 1 day (combined).
I'm using the following javascript to grab the dates:
""// The variable 'data' allows you to reference the request's data in the transformer. // example: return data.find(element => element.isError) return data.error""
Is there a reason you are using formatDataAsObject(transactionsTrackingRead.data)
Have you tried: {{moment(transactionsTrackingRead.data.['Date Created']).format('YYYY-MM-DD')}}
Also 'Date Created', I assume is the name of the column and not the original field name returned in whatever query is returning the data for transactionsTrackingRead.data? Use the original field name? {{moment(transactionsTrackingRead.data.original_field_name_here).format('YYYY-MM-DD')}}
It does take time to learn but Retool is really powerful.
I am wondering that if you reference the table where you are storing the data from the spreadsheet instead of the spreadsheet itself it may work...
@Matt_Crystal
I do. Send me a PM for what times work for you. Or you can wait for tomorrow at 2pm EST for Retool office hours where the Retool team will be available for questions/help. Either way happy to help... pretty sure there's a solution to be found
Awesome Scott - thank you... I just joined discord and will go ahead and post the question there via loom. I'll also be on the call tomorrow. Thank you!