I have a list, such as the following:
li = {"2017-10-16", 10.24, 10.71, 10.18, 10.61, 10.61, 16802200}
Extracting the first element li[[1]] I obtain 2017-10-16. My objective is to change the sign - to a comma ,. I tried using the Replace function, however my implementation:
Replace[li[[1]], "-" -> ","]
returned 2017-10-16.
How can I change - to , in the date listed above?
li /. x_String :> StringReplace[x , "-" -> ","]– Jason B. Nov 16 '17 at 17:36If[StringQ[#], StringReplace[#, "-" -> ","], #] & /@ li;-) – mgamer Nov 16 '17 at 19:18