APIs & Integrations

TSharma55
Miembro

custom date format for blog post

resolver

{{ 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 Me gusta
1 Soluciones aceptada
JTBuys
Solución
Colaborador | Partner nivel Platinum
Colaborador | Partner nivel Platinum

custom date format for blog post

resolver

@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')}}

 

Ver la solución en mensaje original publicado

1 Respuesta 1
JTBuys
Solución
Colaborador | Partner nivel Platinum
Colaborador | Partner nivel Platinum

custom date format for blog post

resolver

@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')}}