ozgecatak
(Ozgecatak)
December 6, 2022, 8:29am
1
Hi,
I have to take name of last month in capital letters and in Turkish. When I use the code below, one letter is lowered because it is a Turkish character.
str_Month= DateTime.Now.AddMonths(-1).ToString(“MMMM”, System.Globalization.CultureInfo.CreateSpecificCulture(“TR-tr”)).ToString
For example November=KASIM in Turkish, I get it like KASıM.
I use toUpper but it didnt work.
Hello @ozgecatak
ToUpper should work to change to upper case. But make sure all the letters in the word are alphabets. I tried the below workflow and its working as expected.
Thanks
varunk
(Varun Kumar)
December 6, 2022, 8:39am
3
@ozgecatak
As you given example Input=KASIM in Turkish, to get this as capital letters try with below syntax it will work
Input.ToUpper
Thanks
Varun
ozgecatak:
str_Month= DateTime.Now.AddMonths(-1).ToString(“MMMM”, System.Globalization.CultureInfo.CreateSpecificCulture(“TR-tr”)).ToString
For example November=KASIM in Turkish, I get it like KASıM.
Hello @ozgecatak
Kindly try this below code
DateTime.Now.AddMonths(-1).ToString(“MMMM”, System.Globalization.CultureInfo.CreateSpecificCulture(“TR-tr”)).ToString.ToUpper(System.Globalization.CultureInfo.CreateSpecificCulture(“TR-tr”))
system
(system)
Closed
December 9, 2022, 8:48am
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.