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

Question

Question

Incorrect date format for date field in submitted form

asked on June 4, 2015

In a form we're using, the destination folder, when saving to the repository, has a date field specified within the folder name.  Despite the date fields being entered as yyyy-mm-dd, and the default date format, on the server where Forms reside, being specified as yyyy-mm-dd, the format of the date in the folder name above ends up as dd/mm/yyyy.  I also built a small workflow to retrieve these field values, and tracking the tokens associated with each field, the format here is also dd/mm/yyyy.  

Is there somewhere else the date format might be specified this way, and would need to be modified?  I find it weird that despite specifying the date format the way we want in Forms, and on the server, the format still ends up otherwise.

As always, thanks to anyone who can help!

Marty Gaffney - Town of Okotoks

0 0

Replies

replied on June 5, 2015

So based on your instructions, I changed the lines of code in RoutingEngineServiceHost.exe.config to the following:

<add key="UseSystemDateTimeFormat" value="false" />
    <add key="DefaultDateTimeFormat" value="yyyy-mm-dd hh:mm a" />
    <add key="DefaultDateFormat" value="yyyy-MM-dd" />

Despite doing this, the date values are still being stored/retrieved in dd/mm/yyyy format.  I have also tried restarting the Laserfiche Forms Routing Service, but this didn't appear to help either.  I also tried changing the IgnoreBrowserLanguage attribute back to "True" (and restarting the Laserfiche Forms Routing Service), but this didn't appear to help with this either.

Could there be something else I'm doing wrong here?  Thanks for your assistance with this.

Marty Gaffney - Town of Okotoks

1 0
replied on June 5, 2015

Hi there,

Date field format is only applicable when viewing date field as part of the form.

The format of date variable in save to repository is configurable. 

If you go to the Laserfiche\Laserfiche Forms\Forms\bin\RoutingEngineServiceHost.exe.config

    <add key="UseSystemDateTimeFormat" value="true" /> if this is set to true, it will use the Forms server date format.

You can change it to false, and set the format yourself.

    <add key="DefaultDateTimeFormat" value="MM/dd/yyyy hh:mm a" />
    <add key="DefaultDateFormat" value="MM/dd/yyyy" />

0 0
replied on June 8, 2015 Show version history

I have actually gone so far as trying to change the DefaultDateFormat from "dd/MM/yyyy" to "MM/dd/yyyy", and the format of the tokens being passed through did not change.

Could there be something else I might need to look at in this instance?

0 0
replied on June 8, 2015

Hi there,

Did you restart Laserfiche routing engine service after the changes?

0 0
replied on June 8, 2015

I did restart the Forms Routing Service, but this didn't seem to help.

What *did* help here was to log in as the user associated with the Laserfiche Forms Routing Service, and change the default date and time format the way I wanted.  

Although this fixed the issue I was experiencing in a couple of places, when I went to resubmit form submissions associated with a particular form, they are now all stuck submitting, and the following error now appears in the Error Log:

No account is configured to archive the form submission to Laserfiche

I'm thinking I might start a different thread for this new issue I've found?

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

Sign in to reply to this post.