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

Question

Question

Quick Fields - converting text to date

asked on November 20, 2015

I have a Document that I am capturing the Date from using OCR and Pattern Matching Token. The Date Format looks like 22 Oct 2015.

Our Folder Structure in Laserfiche looks like \Year\Month\Course Name

I Can easily extract the text from the page in this format and put it in a Text Field which I then parse to create the Folder structure

For searching purposes, we also require this to be a Date Value, for the example of searching between dates which would be a MetaData field.

What appears to be happening in Quick Fields is that regardless of how I set up my Date Field Format, Short, Long or Custom, QF always displays the Short Date format, and doesn't convert the Text to Date correctly.

I tried using the Token Editor with Formatting which creates a revised Token Value %(DateOCR#"dd MMM yyyy"#)  but the result is the Date Field is incomplete. It ends up looking like 22/ /2015 and gets flagged (this Date / Time value is invalid)

Suggestions?

0 0

Replies

replied on November 20, 2015

Quick Fields uses the date format from Windows. Date formats specified in the Laserfiche Admin Console are only for display in the Client. You'll notice that when editing the field, the Client also reverts to the Windows format.

Formatting the token to match the Windows date format should give you the correct value. On my machine with date format MM/dd/yyyy, %(Token 1#"MM//dd//yyyy"#) produces 10/22/2015 in a date field. You can use the same token or the date field token formatted as %(Token 1#"yyyy"#) to get the year for the folder path. For the month, you can either use "MM" for the 2-digit month or "MMMM" for the spelled out month.

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

Sign in to reply to this post.