Format string "yyyymmdd" to "yyyy-mm-dd"

How do I format “yyyymmdd” to “yyyy-mm-dd” using regex or an activity?

2 Likes

yah sure
use a simple assign activity like this
if theinput is
str_input = “20190428”

then to get “2019-04-28”

str_output = Datetime.ParseExact(str_input,“yyyyMMdd”,System.Globalization.CultureInfo.Invarianculture).ToString(“yyyy-MM-dd”)

hope this would help you
Cheers @flexlutherr

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.