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

Question

Question

Quick Fields Date Problem when original has one digit for the month

asked on June 6, 2019

I have Journal Entry batches that are scanned, then processed by Quick Fields for the Date, Batch Number and some key words to fill into a Subject field.

Sometimes, the date that Quick Fields is picking up has only one digit.  Example:  6 instead of 06 for June.

This date problem messes up the date QF ends up with and, instead of a quick fix, I have to change the date from 2016 to 2019.  

Here is what I have configured:

It first grabs a token for the date:

 

Then there is a substitute stage to get the date right, and this is where it fails if there is only a 6 instead of 06 for June (as in the example):

The substitution option doesn't seem to be able to handle the alternate option.  For instance, I tried:

Is there another way?

0 0

Answer

SELECTED ANSWER
replied on June 6, 2019 Show version history

In regular expressions, you can use Quantifiers to specify how many times you want the previous class to be matched. So, you can change your Replace regex to something like this.

(\d{1,2})/(\d{1,2})/(\d{1,2})

This says to match each date part a minimum of once, and a maximum of twice.

 

How are you using the newly formatted date? I could suggest a different approach that will save you the substitution step.

If you have a properly formatted date (06/12/2019) to begin with, Laserfiche can identify it as a date, and help you reformat it. Here's an example that demonstrates the concept.

The documentation has a section on formatting dates.

1 0
replied on June 6, 2019

Thank you!  That worked!

0 0

Replies

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

Sign in to reply to this post.