Date Token Values May Not Contain Leading Zeros.

April 20, 2009 | KB: 1012193
Workflow Suite 8

Summary

The date format for date token values may default to m/d/yyyy.

Cause

The date format depends on the Windows regional settings for the user account associated with the Laserfiche Workflow service. By default, the service runs under the Local System Windows account. Local System uses the M/d/yyyy short date format.

Workaround 1

Modify the Laserfiche Workflow Service to run under a different user account. Then log in to the computer hosting the Laserfiche Workflow Server as that user account and customize the Windows Regional and Language options to use a MM/dd/yyyy short date format.

Workaround 2

Add a Pattern Matching activity and use regular expressions to modify an incoming date token value. The resulting token from the pattern matching activity will contain the modified date value such that there is a leading zero for single digit months and days.

For example, if your workflow already contains previous Pattern Matching activities that take a date field value and break it into the month, day, and year components, you can add two additional Pattern Matching activities that takes the month and day components and output values that contain leading zeros for single digit months and days. The Pattern Matching activity would have an input value like:

0%(TokenName)

And a regular expression like:

\d\d$

The activity adds a leading zero to the incoming value and then extracts the last two digits.