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

Question

Question

Custom Date YYYYMMdd not appearing correctly in file name

asked on November 21, 2017

Hi,

 

I am using a custom date format for one of my fields that happens to end up as the file name.  The format in the feild is YYYYMMdd and when I use that field as the file name it shows up like MM/dd/YYYY.  Is there a way to display the file name as my custom date format?  

Thank you,

Jennifer

0 0

Answer

SELECTED ANSWER
replied on November 23, 2017

Okay, there's a couple problems there.

  1. %(Token (YYYYMMDD)) is not a valid format.
    • Note that the "Apply Formatting" box is not checked and the associated field is empty; this means that Workflow does not recognize the (YYYYMMDD) you put at the end of the token.
    • Delete what you manually entered, then check the "Apply Formatting" box and entering your formatting there.
  2. YYYYMMDD is not going to give you the results you want. WF uses .NET date/time formatting and capital letters for Year and Day are not the same as those for month (see the guide here). To get what you want, you should be using yyyyMMdd.

 

When everything is configured correctly, you should see yyyyMMdd in the "Apply Formatting" field, and the token should look like this:

%(Token#"yyyyMMdd"#)

2 0

Replies

replied on November 21, 2017

Does it behave any differently if you use the format of yyyyMMdd ?  (note the lowercase y compared to your uppercase)

1 0
replied on November 21, 2017

Unfortunately not.  I just tried.

Thanks,

 

Jennifer

0 0
replied on November 22, 2017 Show version history

Jennifer, are you setting the format on the Field or the Token? I believe the field formatting (admin console) only tells Laserfiche how to display the data; this doesn't actually affect how the value is stored.

On the back end, LF always uses standard date formatting, so if you pull the field, then plug it directly in as a token you're getting the raw value, not the field format, which is then converted into the default display format.

If you have not done so already, try applying the formatting to the token value (Token Editor) when you set it as the name.

0 0
replied on November 22, 2017

I did format the field and the token and I still get the same results.  My regional settings on my PC and the server is also set to yyyy-mm-dd.

 

Thank you,

Jen

0 0
replied on November 22, 2017

Can you provide a screenshot of the token settings (I'm assuming this is in workflow) where you assign the value to the token and/or to the file name.

0 0
replied on November 23, 2017

Yes here is a print screen from the workflow. 

 

token.JPG
token.JPG (76.15 KB)
0 0
SELECTED ANSWER
replied on November 23, 2017

Okay, there's a couple problems there.

  1. %(Token (YYYYMMDD)) is not a valid format.
    • Note that the "Apply Formatting" box is not checked and the associated field is empty; this means that Workflow does not recognize the (YYYYMMDD) you put at the end of the token.
    • Delete what you manually entered, then check the "Apply Formatting" box and entering your formatting there.
  2. YYYYMMDD is not going to give you the results you want. WF uses .NET date/time formatting and capital letters for Year and Day are not the same as those for month (see the guide here). To get what you want, you should be using yyyyMMdd.

 

When everything is configured correctly, you should see yyyyMMdd in the "Apply Formatting" field, and the token should look like this:

%(Token#"yyyyMMdd"#)

2 0
replied on November 23, 2017

Thank you so much!

0 0
replied on November 23, 2017

Okay, there's a couple problems there.

  1. %(Token (YYYYMMDD)) is not a valid format.
    • Note that the "Apply Formatting" box is not checked and the associated field is empty; this means that Workflow does not recognize the (YYYYMMDD) you put at the end of the token.
    • Delete what you manually entered, then check the "Apply Formatting" box and entering your formatting there.
  2. YYYYMMDD is not going to give you the results you want. WF uses .NET date/time formatting and capital letters for Year and Day are not the same as those for month (see the guide here). To get what you want, you should be using yyyyMMdd.

 

When everything is configured correctly, you should see yyyyMMdd in the "Apply Formatting" field, and the token should look like this:

%(Token#"yyyyMMdd"#)

You are not allowed to follow up in this post.

Sign in to reply to this post.