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

Question

Question

Date token Calculator “String was not recognized as a valid DateTime.”

asked on March 15, 2017

Hello,

I keep getting an error from a Date Token Calculator activity in a work flow, which appears very familiar to the issue posted here https://answers.laserfiche.com/questions/91377/String-not-recognized-as-a-valid-DateTime-error-when-looping-through-search-results#91660, which had no resolution.

I am using a Find Entries activity and retrieving the Created by and Creation Date tokens.  I am then using a Date token Calculator for Each Entry found by the Find Entry Activity, attempting to take the creation date & time and adding X minutes to it.  I keep getting the error on the Date token Calculator “String was not recognized as a valid DateTime.”

I have also tried separating the Date and Time from the Creation Date Token, via Assign Token Values, and then entering them into the Date Token Calculator, but get the same result.

 

How can I use the entry creation date in a date token calculator and not get this error??

Regards,

Darren

 

 

 

 

0 0

Answer

SELECTED ANSWER
replied on March 15, 2017 Show version history

Ok, that's what I thought is happening. Your server is running with a date format of dd/MM/yyyy, but For Each Entry gets the value as MM/dd/yyyy. This is a bug (reference #155528).

Try setting up your Date Token Calculator like this:

2 0

Replies

replied on March 15, 2017

Can you add Track Tokens so we can see the exact values you're working with? What version of Workflow are you using?

0 0
replied on March 15, 2017 Show version history

Miruna,

 

Version 9.2.0.167

See below:

 

 

 

0 0
SELECTED ANSWER
replied on March 15, 2017 Show version history

Ok, that's what I thought is happening. Your server is running with a date format of dd/MM/yyyy, but For Each Entry gets the value as MM/dd/yyyy. This is a bug (reference #155528).

Try setting up your Date Token Calculator like this:

2 0
replied on March 15, 2017

Made the changes, same result "String was not recognized as a valid DateTime"

0 0
replied on March 15, 2017

Sorry missed the double '/' in your post, the #"dd//MM//yyyy"# did the trick.

 

Thank you

0 0
replied on March 15, 2017 Show version history

No problem. The easier way to format tokens is to right-click on them and open the Token Editor:

Then you can write the formatting and the Designer will take care of escaping the special characters and putting it into proper syntax:

0 0
replied on February 7, 2019

Hi all,

 

@████████I have the same bug and I tried your solution but it doesn't work for me.

0 0
replied on February 7, 2019

What version of Workflow are you using? This bug was addressed in version 10.2 with the patch in KB1013837.

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

Sign in to reply to this post.