@Rammohan91, @balupad14, @Gouda_6, @Florent_Salendres, @ClaytonM, @vvaidya, @Palaniyappan
I need to convert the string “03-mag-19” from the format “dd-MMM-yy” to “dd/MM/yyyy”.
How to do that in Italian?
Did you tried these link.
Might be useful
Hi Buddy @CamiCat
Welcome back again
so to convert this use like in assign activity
mydate = DateTime.Now.ToString(“dd/MM/yyyy”,new CultureInfo(“it”))
EDIT : out_date = DateTime.ParseExact(in_date,"dd/MM/yyyy",new CultureInfo("it")).ToString
Using @Palaniyappan idea with CultureInfo, you will need to use ParseExact, I think.
To convert that string, it will be like this:
DateTime.ParseExact("03-mag-19","dd-MMM-yy", new CultureInfo("it")).ToString("dd/MM/yyyy")
If the month is the full name, like "03-maggio-19, then change format from dd-MMM-yy to dd-MMMM-yy
I hope that helps.
aahah, right…exactly with parseexact…
Thanks buddy @ClaytonM
DateTime.Parse("03-mag-19", new CultureInfo("it")).ToString("dd/MM/yyyy")
…since it is in a recognizable date format already.
So use that which is better I think, but both work.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.