You are viewing limited content. For full access, please sign in.

Question

Question

Pattern Matching Fiscal year

asked on May 29, 2019

Is it possible to get a Pattern Match for the Fiscal year instead of the Calendar year?

I found this Pattern: 1[0-2]/\d?\d/2019|0?[1-9]/\d?\d/2020, but it returns a Result Value of (Nothing.)

 

Currently using this Pattern Matching:

Input:%(RetrieveFieldValues3_Date)

Pattern: \d?\d?/\d?\d?/(\d?\d?\d?\d?)

 

Fiscal Year.PNG
Fiscal Year.PNG (12.44 KB)
0 0

Replies

replied on May 29, 2019

What makes a fiscal year date different than a standard date? The pattern you have there won't work because the input contains the year 2019, and the pattern is looking for 2020.

Can you explain what specifically you need to be able to find?

1 0
replied on May 29, 2019

This is a workflow I created is for our Finance Department. The goal is to have items for each Fiscal year. Our Fiscal year is Oct- Sept, e.g the 2019 Fiscal year is from October 2018 to September 2019. 

 

So in October 2019 the Year will turn to 2020.

0 0
replied on May 29, 2019

Pattern matching only extracts information from the existing data. It cannot add years that are not there.

But, it looks like you're fiscal year is offset by 3 months from calendar years. I think you can do this with Token Calculator. If you add 3 months to any date and then format it to get just the year, you'll get the fiscal year.

For ex, anything before 10/1/2019 will still be in 2019 when you add 3 months, which will give you 2019 as the year. Anything after 10/1/2019 will be in 2020 when you add 3 months, so when you format it, you'll get year 2020.

4 0
replied on May 30, 2019

The regex I use for date everywhere is ^\d{2}\D{1}\d{2}\D{1}\d{4}$

This assumed a date like 12-01-2019 OR 01-12-2019. You can simply change the number inside \d{2} if your format is different.

If you only want the year you can enclose the \d{4} in parenthesis like so ^\d{2}\D{1}\d{2}\D{1}(\d{4})$

Good luck!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.