How to display current year from date created field?

  • 0
  • 1
  • Question
  • Updated 8 months ago
  • In Progress
I want to display current year, from date created field. I have a formula date field but it gives me an error on the formula "Year[Date Created]. Also I need to know this 'Year' field which i create won't change when the year changes. Thanks
Photo of Raj Helaiya

Raj Helaiya

  • 1,246 Points 1k badge 2x thumb

Posted 8 months ago

  • 0
  • 1
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb
Year(ToDate([Date Created])) = numeric field
Photo of Raj Helaiya

Raj Helaiya

  • 1,246 Points 1k badge 2x thumb
As it is based on date created it won't change when the year changes to 2019, correct? 
Photo of Evan Martinez

Evan Martinez, Community Manager

  • 8,774 Points 5k badge 2x thumb
Hi Raj,

Most likely you are getting that error message because you don't have parenthesis around the field name to show that you want the year function to effect it. I would suggest trying

Year(ToDate([Date Created]))
If you do then that formula field will reflect the year that the record was created and will not change. You would also want to make sure it will match the field type that you are using. Are you attempting to put it into a formula date or formula numeric?
(Edited)
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb

Raj

The formula reflects the year value in the [Date Created] field. Since the value in [Date Created] never changes, the formula will never change as it mirrors the year in [Date Created].

Photo of Raj Helaiya

Raj Helaiya

  • 1,246 Points 1k badge 2x thumb
Thank you for the quick response Evan and Chris.