GraphQL transforming time field to number

In your config.yml use the datetime widget and the format options provided by Netlify:

- { name: startTime, label: "Start Time", widget: datetime, date_format: MM/DD/YYYY, time_format: false, format: L }
- { name: endTime, label: "EndTime", widget: datetime, date_format: MM/DD/YYYY, time_format: false, format: L },

Change your date_format(MM/DD/YYYY) for any desired format.

Keep in mind that Netlify datetime widget uses momentjs, check their format options to get one that fits you.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top