Feb 1, 2018 10:42 AM
Hi guys,
I'm using imported blogs to create emails but i have one slight problem with the date format. It's formatting in English, whilst the blog is using Dutch:
Any suggestions on how to switch this back to Dutch? I read that it would be possible to set the date to retrieve the format from Hubspot settings, but i have no idea how to go about doing that. My code:
{% set blog_posts = blog_recent_posts('111111111', limit=3) %} {% for item in blog_posts %} {{ item.publish_date_local_time | datetimeformat('%d %B %Y') }} {% endfor %}
Solved! Go to Solution.
Feb 1, 2018 12:03 PM - edited Feb 1, 2018 12:03 PM
Try this
{{ item.publish_date_localized}}
Then set your date formatting in the blog date settings
Feb 1, 2018 11:52 AM
Have you checked your date/time settings in the Content Settings >> Blog >> Date Formats >> Language for Dates? I think that may fix your issue.
Best regards,
Feb 1, 2018 11:54 AM
Hello Narmstrong,
I've checked, and it is set to Dutch, which is what it should be.
~Lex
Feb 1, 2018 11:58 AM
Try this
{{ item.publish_date_localized|datetimeformat('%d %B %Y') }}
Feb 1, 2018 12:01 PM - edited Feb 1, 2018 12:01 PM
Sorry, no luck... This fails to load, so it would seem.
Feb 1, 2018 12:03 PM - edited Feb 1, 2018 12:03 PM
Try this
{{ item.publish_date_localized}}
Then set your date formatting in the blog date settings
Feb 1, 2018 12:11 PM
That did the trick. I did set the blog settings to custom format d MMMM y, and it worked! Thanks!