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

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

1 Like

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

1 Like

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