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

Question

Question

Create date field from 3 different values

asked on October 11, 2019

I am pattern matching to get a date but the format will always be in the following format:

"THIS 11TH DAY OF September, 2019"

I have 3 separate tokens that I've pattern matched to get the day, month and year. It is grabbing all of the values without issue but how can I get them to assign them into one date field? 

0 0

Answer

SELECTED ANSWER
replied on October 11, 2019

Just use the "%(Date Month) %(Date Day), %(Date Year)" style format instead when you assign the token value.

It really depends what you need to do with the value, but if you create a separate token to hold your date and it has the date tag, then it will work with valid inputs.

Workflow is really good at translating dates as long as the information is valid and the formatting is consistent with your region settings.

For example, "January 31, 2019" will be recognized as 1/31/2019

The key is to put it in a valid format and apply the tag.

2 0

Replies

replied on October 11, 2019

If you're confident the values will always be valid, then you can just put them in the token set as a date, or put them (formatted accordingly) directly into anything that accepts dates.

As long as it is in a valid format that conforms to your region settings and the target token is tagged as a date, Workflow is smart enough to know how to handle the values.

You could do something as simple as %(Date Day)/%(Date Month)/%(Date Year), just make sure you set the date tag if your creating a token for it so WF knows what to do with the values.

 

1 0
replied on October 11, 2019

Since the month will always be text and not numerical will that prevent it from creating the date token? If so is there a way to have it convert it from text to the appropriate months numerical value? 

0 0
SELECTED ANSWER
replied on October 11, 2019

Just use the "%(Date Month) %(Date Day), %(Date Year)" style format instead when you assign the token value.

It really depends what you need to do with the value, but if you create a separate token to hold your date and it has the date tag, then it will work with valid inputs.

Workflow is really good at translating dates as long as the information is valid and the formatting is consistent with your region settings.

For example, "January 31, 2019" will be recognized as 1/31/2019

The key is to put it in a valid format and apply the tag.

2 0
replied on October 11, 2019

That did it, Thank you!!

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

Sign in to reply to this post.