Skip to main content
saidivyam
October 26, 2022
Solved

Date functions

  • October 26, 2022
  • 3 replies
  • 1 view

Hi All,

          I have a requirement that to display the month name & Year  from two particular dates .Is there any direct function or please give any valuable suggestions on the same.

Ex:11/2021 --10/2022 

It should display Nov2021,Dec 2021.....Oct 2022

Thanks & Regards

Saidivya Minna.

    Best answer by ujjwalr0002

    Hi, check out the below code I have used date time utility plugin https://community.appian.com/b/appmarket/posts/date-and-time-utilities

    a!localVariables(
      local!startDate: todatetime("10/01/2021"),
      local!endDate: todatetime("12/27/2023"),
      a!forEach(
        items: enumerate(
          elapsedmonths(
            local!startDate,
            local!endDate
          )
        ),
        expression: text(
          addmonths(todatetime(local!startDate), fv!index),
          "MMMM YYYY"
        )
      )
    )

    3 replies

    Participating Frequently
    October 26, 2022

    Hi, check out the below code I have used date time utility plugin https://community.appian.com/b/appmarket/posts/date-and-time-utilities

    a!localVariables(
      local!startDate: todatetime("10/01/2021"),
      local!endDate: todatetime("12/27/2023"),
      a!forEach(
        items: enumerate(
          elapsedmonths(
            local!startDate,
            local!endDate
          )
        ),
        expression: text(
          addmonths(todatetime(local!startDate), fv!index),
          "MMMM YYYY"
        )
      )
    )

    saidivyam
    saidivyamAuthor
    October 26, 2022

    It is working fine..

    Thanks Ujwal

    Participating Frequently
    October 26, 2022

    Welcome [emoticon:fbd079a1c4f748c5a234faee215de9cc]