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

Question

Question

Cloud Workflow Applying Time Format

asked on August 7, 2023

In Laserfiche Cloud's Workflow, I am attempting to format a time field to just be the single digit hour.  Thus for the time of "09:48:56 AM", I would want it to return just "9".  In on-premise Workflow, you would set the time formatting to be "h" for it to return "9" or "hh" for it to return "09".  For the cloud, it works fine with "hh", however with just a single "h", it returns the entire time.

 

Additionally, I notice similar issues when using "H" vs. "HH", "m" vs. "mm", and "s" vs. "ss".  I am guessing this is a bug and I know how to work around it but thought I would bring it up in case it is effecting anyone else.

0 0

Answer

SELECTED ANSWER
replied on August 7, 2023

It's not a bug, it's a special behavior in .Net date formatting when date/time formatters are specified on their own rather than a date/time pattern: https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings#UsingSingleSpecifiers

Use %h instead.

1 0

Replies

replied on August 7, 2023

Good to know.  Thanks for the follow-up.  

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

Sign in to reply to this post.