0

Need to separate the month and year based on the created date. So I'm planning to create 2 formula fields and whenever the record is created needs to populate the month and year fields based on the Created date. Please let us know the syntax to create the formula field for this. If any alternative way please share it across.

1 Answer 1

0

you can use it.

Month -- VALUE(MONTH( DATEVALUE( CreatedDate ) ) )
Year -- VALUE(YEAR( DATEVALUE( CreatedDate ) ) )

You can use this formula for month Name

CASE(VALUE(MONTH( DATEVALUE( CreatedDate ) ) ), 1, "January", 2, "February", 3, "March",  4, "April",  5, "May",  6, "June", 7, "July", 8, "August", 9, "September", 10, "October", 11, "November", 12, "December", "None")
4
  • Yes Tried. Error: Formula result is data type (Number), incompatible with expected data type (Text)
    – Iqbal
    Nov 9, 2015 at 10:38
  • @techsolutions updated my answer. Nov 9, 2015 at 10:41
  • Are you thinking about following lines here: TEXT(YEAR( DATEVALUE( CreatedDate ) ))
    – Iqbal
    Nov 9, 2015 at 10:45
  • In month field its storing integer, I would like to store the month like Jan/January like this.
    – Iqbal
    Nov 9, 2015 at 10:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .