APIs & Integrations

TSharma55
Member

custom date format for blog post

SOLVE

{{ rec_post.publish_date|datetimeformat('%B %e, %Y')}}
I am using this in blog post which is rendering December 12, 2024.

But can we get the customize date format from which I get
Dec 12, 2024 >

0 Upvotes
1 Accepted solution
JTBuys
Solution
Top Contributor | Platinum Partner
Top Contributor | Platinum Partner

custom date format for blog post

SOLVE

@TSharma55, that filter has been deprecated. I recommend using the hubl below. This hubl uses the format_date filter which is based on unicode LDML patterns. The MMM portion will format the month in the abbreviated style you want.

 

{{rec_post.publish_date|format_date('MMM d, y')}}

 

View solution in original post

1 Reply 1
JTBuys
Solution
Top Contributor | Platinum Partner
Top Contributor | Platinum Partner

custom date format for blog post

SOLVE

@TSharma55, that filter has been deprecated. I recommend using the hubl below. This hubl uses the format_date filter which is based on unicode LDML patterns. The MMM portion will format the month in the abbreviated style you want.

 

{{rec_post.publish_date|format_date('MMM d, y')}}