Skip to main content
Solved

How to populate previous month name?

  • August 1, 2022
  • 1 reply
  • 98 views

Forum|alt.badge.img+2

Good Morning,
I’m trying to populate the name of the previous month, but I couldn’t find any documentation on how to do so.


I only did find the tags for current day/month/year
what I'm looking for is a tag for the previous month & year, or how to do these simple operations: 

({% current_month_name %} - 1 month)

( {% current_year %} - 1 year )
 

Thanks

Best answer by alex.hong

Hi @MagdyAbdelaal,

Welcome to the Community.

You are correct that we do only have date tags available for the current dates + today and future dates. In our HC article, we go over how to use these tags but there is no days before tag at the moment. I think a workaround some people do is to create a custom profile property on customers based on what they would need prior dates for. Could you explain the purpose of this tag and maybe we can discuss a workaround.


Thanks,

Alex

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

alex.hong
Forum|alt.badge.img+58
  • Klaviyo Alum
  • 1552 replies
  • Answer
  • August 2, 2022

Hi @MagdyAbdelaal,

Welcome to the Community.

You are correct that we do only have date tags available for the current dates + today and future dates. In our HC article, we go over how to use these tags but there is no days before tag at the moment. I think a workaround some people do is to create a custom profile property on customers based on what they would need prior dates for. Could you explain the purpose of this tag and maybe we can discuss a workaround.


Thanks,

Alex


Reply