Skip to main content
Nintex Community Menu Bar

How to parse year from a date variable

  • Mar 9, 2021 7:15 PM UTC
  • 2 replies
  • 796 views
  • Translate All

Forum|alt.badge.img+7

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

2 replies

Forum|alt.badge.img+11
  • Scholar
  • Mar 9, 2021 9:18 PM UTC

@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

 

 

Translate

Forum|alt.badge.img+9
  • Mar 11, 2021 10:28 AM UTC

Use inline function:

fn-FormatDate(DateVar,"yyyy") 

Translate