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

Question

Question

Quick fields date format 8 numbers to yyyyMMdd

asked on January 15, 2016

Date formatting is a nightmare!

I have pay statements that I am scanning into our database.  The statement date format is as follows.

I run and OCR on the zone and pattern match.

However my results are always text "yyyy/MM/dd instead of 2016/01/10

I have read many posts on this but can not seem to work my way thru this. What am I missing?

0 0

Answer

SELECTED ANSWER
replied on January 15, 2016

The value you're extracting with the pattern match will be treated as a string. An option would be to extract the year, month, and day separately and then use the three tokens to combine the values back into your desired format.

3 0

Replies

replied on January 15, 2016

Thank You! It works.  I have implemented this into my template and is giving me the expected results.

The part of syntax where it ignores the first part of string is what I was missing.  \d{4}(\d{2})

I have not been able to locate anything as yet that explains this syntax or how to set it up. 

0 0
replied on January 15, 2016

A good starting point is the regular expression reference in the Quick Fields help file. It also links to MSDN sites that contain more information.

In the above example, the idea is that you want to extract substrings of the main 8-number string so you would use match groups () to tell it which values to ignore and which ones to capture.

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

Sign in to reply to this post.