Hi, Please help in getting Quarter month value
If i pass Now.Tostring(“MM”) i am getting month value like that can i get Quarter month value
currentMonth = Integer.Parse(DateTime.Now.ToString(“MM”))
quarter= GetQuarter(currentMonth)
- Use the “Assign” activity to get the current month:
currentMonth = DateTime.Now.Month
- Calculate the quarter month value:
quarterMonth = ((currentMonth - 1) / 3) * 3 + 1
- Use another “Assign” activity to display the quarter month value or store it in a variable:
quarterMonthValue = quarterMonth.ToString()
Hope it helps!!
I am getting value as 10 i need the month name please suggest for that
How to pass GetQuarter value
Add this in assign activity
quarterMonthName = New System.Globalization.CultureInfo("en-US").DateTimeFormat.GetMonthName(quarterMonth)
Output Datatype of quarterMonthName is System.String
Add this after that 3 assign activity.
Hope it helps!!
Input=CInt(Now.ToString("MM")) DataType:System.Int32
DateFormat=(Input - 1) / 3 + 1 DataType:System.Double
Maybe you are looking for this:
input DateTime
output Month Name
JAN=JAN, FEB-JAN,MAR=JAN,APR-APR,DEZ-OCT
We can bring the Quarter to the corresponding Quarter Month like below in a test serie:
Simulation the different Month Numbers, which we get from a DateTimeVar.Month
Calculating the Quarter Number
Calculating the Quater Month Number / Name
And can derive from this the following:
CultureInfo.InvariantCulture.DateTimeFormat.GetMonthName(Cint(((Math.Ceiling(YOURDATETIMEVAR.Month / 3) - 1)*3)+1))
Ensure that SystemGlobalization is imported to the Namespaces:
Instead of quarter number 4 i want quarter month name
4= Oct
Can u please share me the xmal file
Was done within immediate panel, so there is no XAML
Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum
Your can do:
Assign Activity:
QuarterMonthName | DataType: String =
CultureInfo.InvariantCulture.DateTimeFormat.GetMonthName(Cint(((Math.Ceiling(YOURDATETIMEVAR.Month / 3) - 1)*3)+1))
replace YOURDATETIME with your Variable name, Datatype: DateTime
I have month column list which contains all months data based on the current quarter month i need to take out the data for example now it’s quarter 4 i need to take ou oct,nov,dec month data from excel column
Let us do the following.
It is better to scope 1 Topic = 1 case. Other researchers can find faster solutions for their similar cases
This topic was started with:
We understood:
and shared
So, just give us a feedback, if we had understood the requirement correct. Along with our understanding and the verifying Series from immediate panel we do feel that the case is solved.
So the topic can be closed:
Forum FAQ - How to mark a post as a solution - News / Tutorials - UiPath Community Forum
With your second input
it looks like another case. So we would suggest to open a new topic for it.
Some starter Help:
arrQuarterMonths | DataType: String Array =
Enumerable.Range(1,12).Where(Function (x) Cint(Math.Ceiling(x / 3)).Equals(YOURQUARTERASInt32)).select(Function (x) CultureInfo.InvariantCulture.DateTimeFormat.GetAbbreviatedMonthName(x)).toArray
and you can use it for the filtering
EDIT:
shortended to:
Enumerable.Range(YOURQUARTERINT*3 - 2,3).Select(Function (x) CultureInfo.InvariantCulture.DateTimeFormat.GetAbbreviatedMonthName(x)).toArray