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

Question

Question

Can workflow change the date format (in the entry name) using Rename?

asked on December 9, 2022

I know I can do this in Quick Fields using Substitution, but the Token Editor in workflow's Rename activity doesn't seem to have this function.  Is there a way to do this?

The pattern that they are coming into the repository as is:  05/Dec/22 TL 118 Inspection Failed

And I need that date changed to 2022-12-05 and I still need the TL 118 Inspection Failed portion to remain at the end of the entry name.

0 0

Answer

SELECTED ANSWER
replied on December 9, 2022

Hi Connie

I think you'll have to do this in a couple steps, extract the data and text from the current file name and then the Date can be reformated when renaming the file. I created  a little workflow below to take you through it.

 

Using Pattern matching I pull the Date (GetDate) from the current name

Then using a None Capture Group I get everything but the Date (GetName)

Then when using the tokens to the Rename Entry, Right click on the Date Field and Apply Formating to change the date format. Notice I also added a space between the Date and the Name as I had removed that in the regex above in case some names had multiple spaces

 

Hope this helps

Steve

0 0
replied on December 9, 2022

This is awesome, Steve, thanks!  I have it all rebuilt now except... how did you get the year in the right order on the last piece.  When configuring my Apply Formatting to the extracted date, it wants to reformat using the 05 as the year instead of the 22 as the year.

0 0
replied on December 11, 2022

Hi Connie, other than applying the formatting to the extracted date field, I didn’t do anything special. If you’re getting different results if might have something to do with your systems clock format. After getting the date, update the year portion to a 4 digit number first. 

1 0

Replies

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

Sign in to reply to this post.