Forum Discussion

fuenteso's avatar
fuenteso
Leader
9 years ago

Velocity. Get the current year

Hi,

 

Is there a way to get the current year on a velocity email template?

 

We have a copyright disclaimer on our emails and we need to change the year every year. I was wondering if there's a way to get the current date and pull the year from there. That way the disclaimer will be acurate as soon as the year changes :)

 

Thanks!

  • OlivierS's avatar
    OlivierS
    Lithium Alumni (Retired)

    fuenteso I haven't tried it. If I had to, I would use: 

     

    $date.get('yyyy')

     

     

    • fuenteso's avatar
      fuenteso
      Leader

      Thanks OlivierS, but it looks like the $date variable is not defined because I see "$date.get('yyyy')" on the notification email. Could it be something I need to ask support to enable/expose for us?