guru2000
Canvas Initiate

How to parse year from a date variable

Using Nintex workflow in SP 2016. I have a variable that stores a date. How do I parse out year from the date field. 

0 Kudos
Reply
2 Replies
claudiaurbanski
Design Canvas Artiste

Re: How to parse year from a date variable

@guru2000 You can use Regular expression to get the 4 consecutive numbers from your date variable (Year)  Add:

Pattern:

(\d{4})

Extract

Input text: Your date variable

 

claudiaurbanski_0-1615324657633.png

claudiaurbanski_1-1615324675113.png

 

0 Kudos
Reply
mlauer
Connector Crackerjack

Re: How to parse year from a date variable

Use inline function:

fn-FormatDate(DateVar,"yyyy") 

0 Kudos
Reply