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

Question

Question

Date pattern Error OCR format is dd/mm/yyyy but my WF server regional setting is mm/dd/yyyy

asked on November 6, 2017

Hi,

My OCR text is in dd/mm/yyyy format where as my WF server Regional setting is mm/dd/yyyy.

 

I have used the Regular expression \d{2}\/\d{2}\/\d{4}   to extract the date  formatted the the token as 

dd/MMM/yyyy

 

if my ocred date is 10/06/2017 then its returning the value as 06/Oct/2017 instead of 10/Jun/2017

and if the date is 28/06/2017 then nothing is showing. if change the Regional settings to dd/mm/yyyy then it works as expected. 

 

Please help me to fix the issue without changing the Regional settings Date change

 

 

0 0

Answer

SELECTED ANSWER
replied on November 6, 2017

Hi Miruna,

 

Thanks for the update. Have formatted the pattern and splited the day / month /year and its working as expected

using Apply Regular Expression

Day = \d{2} 

Month  = /(\d{2})

Year = /(\d{4})

 

1 0

Replies

replied on November 6, 2017

Formatting only works according to the machine's date format. You'll need to use Pattern Matching to break out the month and day and rebuild your date in the proper order before formatting it.

0 0
SELECTED ANSWER
replied on November 6, 2017

Hi Miruna,

 

Thanks for the update. Have formatted the pattern and splited the day / month /year and its working as expected

using Apply Regular Expression

Day = \d{2} 

Month  = /(\d{2})

Year = /(\d{4})

 

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

Sign in to reply to this post.