1

I have a list for purchase agreements that has a column for start date, what I want is a way to populate another column with the month and day from the start date but with the current year. I assume this can be done through power automate but I can't figure out how.

1
  • Do you need another column editable later on? If no, you can achieve it using calculated column as well. Let me know if you want to do it using calculated column or using power automate only. Commented Oct 5, 2023 at 5:37

3 Answers 3

0

It is perhaps not particularly intuitive, but you want to create an expression using the 'addToTime' function. Something like this:

addToTime(outputs('Get_item')?['body/StartDate'],1,'Year')

where

outputs('Get_item')?['body/StartDate']

is your Start Date field from a previous action in your flow.

See here for a more detailed explanation: https://www.powertechtips.com/add-years-to-date-power-automate/

0

If the field is not required to be editable in the future, you can simply create a new calculated column, set as date with this formula:

    =DATE(YEAR(2023),MONTH([Created]),DAY([Created]))

Where instead of [Created] you can add your column name.

You can also use YEAR(TODAY()), but please keep in mind that calculated fields are "recalculated" on item create/edit with TODAY() so you might experience some issue so rather hardcode the correct value like YEAR(2O23) or YEAR([Created]+1) might be more suitable.

0

If you don't want to edit values in another date column in future using list forms, you can use calculated column formula for your another column.

Create a new calculated column with formula like:

=IF(ISBLANK([Start Date]),"",DATE(YEAR(TODAY()),MONTH([Start Date]),DAY([Start Date])))

This formula handles the case if Start Date column is blank.

Column Settings:

enter image description here

Output:

enter image description here


Note:

  1. Sometimes comma(,) does not work in formula (it is based on language or regional settings on your site). So in that case use semicolon(;) instead of comma(,).
  2. Use correct display name of your SharePoint columns in above formula.
  3. Wrap column names inside [] if your column name has space in it. For example: [My Column Name].

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.