hi i want to change my string variabel into another format but i dont want to make it a datetime variable
ex: string input: “22/12/2021”
string output :“22.12.2021”
any solution?
thanks
hi i want to change my string variabel into another format but i dont want to make it a datetime variable
ex: string input: “22/12/2021”
string output :“22.12.2021”
any solution?
thanks
Use replace method
Try out this syntax
Output_String=Your_stringvariale.Replace("/",".")
Thanks,
Robin S
Hi @Ahmad_Rais
Try this below expression
DateTime.ParseExact(“22/12/2021”,(“dd/MM/yyyy”),Globalization.CultureInfo.InvariantCulture).ToString(“dd.MM.yyyy”)
Refer this Link for More Info
Regards
Gokul
is this for input string type or datetime? , i was looking for both input and output string type
Just use replace method
i have tried but somehow it still says error
but if i make new file it works maybe i miss something
Hi
It might be because of extra space at last
Hope this expression would help you resolve this
Use a assign activity like this
Stroutput = Datetime.ParseExact(Strinput.ToString.Trim.SubString(0,10), “dd/MM/yyyy”, System.Globalization.CultureInfo.InvariantCulture).ToString(“dd.MM.yyyy”)
Here both Strinput and stroutput both are string variables
Cheers @Ahmad_Rais
yup , its because of the whitespace the trim done the trick
hi thanks for the suggestion , the trim done the trick
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.