Join the Webstudio community

Updated 2 months ago

Formatting Date Values coming from CMS (Hygraph)

At a glance

The community member is using Hygraph to power their blog, but the date format is in ISO 8601 which they would like to reformat. They ask if they can directly format the date in the Webstudio Expression Editor or if they would need to paste it in a text box and reformat it each time. Another community member suggests using the "Time" component, which the original poster confirms works well and they were not aware of this feature until now.

I'm powering my blog with hygraph, which works wonderful. As i didn't find any way to directly set the format of the date in hygraph itself it comes to my site in the ISO 8601. What is the best way to reformat it now in Webstudio? Can i directly format these inside the Expression Editor? Or would I have to paste it in an text box and then reformat it every time?
B
s
2 comments
Did you try "Time" component?
that actually works wonders, didn't know this field was there until now. Thank you @TrySound
Add a reply
Sign up and join the conversation on Discord