Hi Everyone !
I’m new to UI Path , can anyone please tell me how to get the current month name completely ?
Eg: October
Hi Everyone !
I’m new to UI Path , can anyone please tell me how to get the current month name completely ?
Eg: October
@priya_joshi_thaneti Try this
System.DateTime.Now().Month.ToString(“MMM”)
This only have me the month as OCT ,
however I tried —> date.now.tostring(“MMMM”)
and got the desired output
You can use this to get the Current full Month name
strMonthName = New DateTimeFormatInfo().GetMonthName(DateTime.Now.Month).ToString()
Regards
Balamurugan.S
hello a way to make the months in Spanish
Yes this will Give you what you want
String MonthName =
DateTime.Now.ToString("MMMM", System.Globalization.CultureInfo.CreateSpecificCulture("es")).ToString
//Output - noviembre
Regards…!!
Aksh
Hello @priya_joshi_thaneti
Can you explain how you did it. As how did you assign it?
Can we get the yesterdays Month? Please suggest
Sure you can use that code and add “DateTime.Now.AddMonth(-1).ToString…”
do you know how you can have the months in dutch? Do i have to change “es” to “nl” or to “dutch”?
Hey @438654
Hey Mate
you are right.
DateTime.Now.ToString("MMMM", System.Globalization.CultureInfo.CreateSpecificCulture("nl")).ToString
Output - mei
Regards…!!
Aksh
Thank you it works. Do you also have a solution for GenericValues?
Aug = date.now.tostring(“MMM”)
System.DateTime.Now().ToString(“MMM”)
System.DateTime.Now().ToString(“MMM”)
You should try this.
Date.Now.ToString(“MMMM”)
How to get current month minus 18 months i.e for example this is November2023 and I want to get May 2022 as output.
Try something like this
System.DateTime.Now.AddDays(-(System.DateTime.Now.Day - 1)).AddMonths(-18).ToString("MMMM yyyy")