Need Regex to format date from YYYY-MM-DD to MM/DD/YYYY
C
Cathy Allen
started a topic
about 5 years ago
I need a regular expression to convert a date that is coming in YYYY-MM-DD. I found the article in knowledgebase on regular expressions and saw item 17 (see below), however my separator is a hyphen rather than a slash. Please help.
17. Changes date format from YYYY/MM/DD to MM/DD/YYYY:
Replacement Value: $2/$3/$1
Value to Match On: (^\d{4})/((?<=/)\d{2}(?=/))/(\d{2}$)
Cathy Allen
I need a regular expression to convert a date that is coming in YYYY-MM-DD. I found the article in knowledgebase on regular expressions and saw item 17 (see below), however my separator is a hyphen rather than a slash. Please help.
17. Changes date format from YYYY/MM/DD to MM/DD/YYYY:
Replacement Value: $2/$3/$1
Value to Match On: (^\d{4})/((?<=/)\d{2}(?=/))/(\d{2}$)