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

Question

Question

Convert String Date "yyyymmdd" to format "mm/dd/yy" using Regex

asked on November 6, 2023

Hello:

I'm working in QuickFields and have done a query into Sage 300 accounting which feeds dates as a string in the format of "yyyymmdd". I'm using the Token Editor and can figure out the 3 separate date elements but am unable to, in Regex to rearrange the string date to the short date format of mm/dd/yyyy?  Any direction would be greatly appreciated.  Thank you.

0 0

Answer

APPROVED ANSWER
replied on November 6, 2023

Assuming you don't need to support multiple date formats, you can use a Substitution process to do what you're asking.  Or you could capture each part of the date as a separate token and recombine them in any order in an Assign Token Value process.  Also, just something to be aware of is that token formatting supports date/time formatting.  It won't help with parsing the yyyymmdd format, but could help when reformatting the date/time (e.g., if you wanted to drop leading zeroes on the month and day or change to a 2-digit year).

0 0

Replies

replied on November 6, 2023

Thank you so much...this solution converted as expected.  I needed to check the option "Replace the input token's value with the result" as below and the token worked.

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

Sign in to reply to this post.