Share via

Calculated Text based on a date column

Anonymous
2024-12-30T08:43:45+00:00

Hello,

I’m working with a Microsoft tool where I need to create a calculated text column based on a release date column. The goal is to display specific text depending on how much time has passed since the release date (specified in a column [DATE]):

  • If the release date is within the last 6 months, the text should say “Latest Version.”
  • If the release date is between 6 and 12 months ago, the text should say “Recent.”
  • If the release date is between 12 and 24 months ago, the text should say “Old.”
  • If the release date is more than 24 months ago, the text should say “Obsolete.”

Could you provide guidance on how to set up this calculated column, including the formula or expressions I should use to achieve this?

Thank you for your support!

Best regards,

Thibaut

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2024-12-30T11:21:07+00:00

Dear Thibaut,

Thank you for reaching out with your query. I understand you’re looking to create a calculated text column in your Microsoft tool to dynamically display text based on the difference between the current date and a release date.

Here’s a formula you can use in SharePoint to achieve this. Assuming your date column is named [DATE], the following formula can be entered in the calculated column:

=IF(DATEDIF([DATE], TODAY(), "m") <= 6, "Latest Version",  
IF(DATEDIF([DATE], TODAY(), "m") <= 12, "Recent",  
IF(DATEDIF([DATE], TODAY(), "m") <= 24, "Old", "Obsolete")))  
  1. Go to your SharePoint list > click settings icon > list settings
  2. Create a new column and select Calculated as the column type.
  3. Paste the formula above into the formula field.
  4. Set the data type returned to Single line of text.

Here is how it looks after setup.

If you encounter any issues or have additional requirements, feel free to let me know!

Best regards,
Community Moderator | Sophia

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful