Announcement

Collapse
No announcement yet.

Populating Month/Year in Date Time field through Workflow Formula

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Populating Month/Year in Date Time field through Workflow Formula

    Hi,

    I am trying to create a field that just displays the Month and Year of the 'Account Cancellation Date'. I have attached a screenshot of the Workflow I'm using to do so - note that I have created two fields for testing.

    Neither fields seem to be working accurately - see the attached screenshot of the result after the flow ran. Does anyone have suggestions on how to correct this?


  • #2
    Hi there, dateTime field can play funny. I recommend you using Sandbox to test these formula. My formula get kill because recently I change from date to dateTime instead.

    For any dateTime you must add in timezone as well, even if it blank for example (just writing on top of my head, please check documents)

    cancel = datetime\format(schedule, 'america/newyork', 'MM YYYY')

    if you don't want that specific timezone, leave it blank, like this:

    cancel = datetime\format(schedule, '', 'MM YYYY')​

    Sandbox will throw you a 503 Error I think if you doing it wrong.

    Use something like this in formula to see if you doing it right:

    outputprint(
    datetime\format(schedule, '', 'MM YYYY')​
    )

    Comment

    Working...
    X