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.
- 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.
- Select a Log To History List action to see the output value in workflow history. Insert an output assigned variable (varCreatedYear) in Message.
Output
Here you can see the year extracted from a date.
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.