How To Extract Year Out Of Date in Nintex Workflow

In this blog, we are going to see how to extract the year from date in the Nintex workflow. In this case, we're gonna use regular expressions to extract the year out of date.

  • Select Regular Expression action in the workflow.

    Extract Year Out Of Date in Nintex Workflow
  • Double-click the Regular Expression action to open the action configuration window.
  • Do the following to extract the year in a date.
    • Insert a date time variable in String.
    • Choose Extract in String Operations.
    • Type Pattern as (\d{4}).
    • Create a Variable and choose that in Output
    • Click Save to save the action configuration.

    Extract Year Out Of Date in Nintex Workflow

    Extract Year Out Of Date in Nintex Workflow

  • Select a Log To History List action to see the output value in workflow history.  Insert an output assigned variable (varCreatedYear) in Message.

    Extract Year Out Of Date in Nintex Workflow

Output

Here you can see the year extracted from a date.

Extract Year Out Of Date in Nintex Workflow

That’s it, you have seen how to extract the year out of date. Feel free to fill up the comment box below if you need any further assistance.