Skip to main content
Partner - Platinum
August 1, 2022
Solved

How to populate previous month name?

  • August 1, 2022
  • 1 reply
  • 159 views

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

    This topic has been closed for replies.
    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

    1 reply

    alex.hong
    alex.hongAnswer
    Klaviyo Alum
    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