Hi All,
I want to convert “MM” date to “MMMM” format, for example MM=05, MMMM=May, any leads
cheers!
Hi All,
I want to convert “MM” date to “MMMM” format, for example MM=05, MMMM=May, any leads
cheers!
in general it is about reformatting a string within a XMMY format into a dateTime and then reformat it into a MMMM Format
when only MM is given and no Day, Year we can do:

but we guess that the given string also contains Day / Year info. So we would just adapt the parse format like e.g.
it is returning 0505 as the output, I will getting date in MM-DD-yy format
please reread what we mention and tell all relevant details on a complete base
as initial it was started with
and later mentioned
we can see some inconsistency within the descriptions
feel free to share with us what was done in detail. Also you can prototyping at your end directly within the immediate panel:
Understanding the 6 Debugging Panels of UiPath in the easiest way possible!
Hi @quick_123
Try this
Input="05-08-24"
Output=DateTime.ParseExact(Input,"MM-dd-yy",System.Globalization.CultureInfo.InvariantCulture).ToString("MMMM")
Cheers!!
you should give only MMM and not MMMM
Hi @quick_123 ,
mydate.ToString(“MMM dd yyyy”); // Aug 04 2021
//4th August 2021, 23:58:30:999 (hours:minutes:seconds:milliseconds)
var mydate = new DateTime(2021,8,4,23,58,30,999);
mydate.ToString("MM/dd/yy"); // 08/4/21
mydate.ToString("MM/dd/yyyy");//08/04/2021
mydate.ToString("dd/MM/yy");//04/08/21
mydate.ToString("dd-MM-yy");//04-08-21
mydate.ToString("ddd, dd MMM yyyy"); // Wed, 04 Aug 2021
mydate.ToString("dddd, dd MMMM yy"); // Wednesday, 04 August 21
mydate.ToString("dddd, dd MMMM yyyy HH:mm"); // Wednesday, 04 August 2021 23:58
mydate.ToString("MM/dd/yy HH:mm"); // 08/04/21 23:58
mydate.ToString("MM/dd/yyyy hh:mm tt"); // 08/04/2021 11:58 PM
mydate.ToString("MM/dd/yyyy H:mm t"); // Wed, 04 Aug 2021 P
mydate.ToString("MM/dd/yyyy H:mm:ss"); // 08/04/2021 23:58:30
mydate.ToString("MMM dd"); // Aug 04
mydate.ToString("MM-dd-yyyTHH:mm:ss.fff"); // 08-04-2021T23:58:30.999
mydate.ToString("MM-dd-yyy g"); // 08-04-2021 A.D.
mydate.ToString("HH:mm"); // 23:58
mydate.ToString("hh:mm tt"); // 11:58 PM
mydate.ToString("HH:mm:ss"); // 23:58:30
mydate.ToString("'Full DateTime:' MM-dd-yyyTHH:mm:ss"); // Full DateTime: 08-04-2021T23:58:30
Regards,
Arivu
String dateString = “05”
// ParseExact to convert MM to DateTime
DateTime parsedDate = DateTime.ParseExact(dateString, “MM”, System.Globalization.CultureInfo.InvariantCulture)
// Convert DateTime to MMMM format
String result = parsedDate.ToString(“MMMM”)
// Output the result
Print the ‘result’ in log message
can u please mark it as solution if u r ok with my answer of changing MMMM to MMM
you convert the string to date the you can convert that date to MMMM formate
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.