UiPath | Get Last Working Day | How to get the last working day in month | VB.Net Code

preview_player
Показать описание
#rpa #uipath #datemanipulation
👉 𝐄𝐧𝐠𝐥𝐢𝐬𝐡
● This video is about how to get the last working day in a month.

👉 𝐆𝐞𝐫𝐦𝐚𝐧
● In diesem Video geht es darum, den letzten Arbeitstag für einen Monat auszugeben.

🌟 𝗖𝗼𝗱𝗲
Day = DateTime.DaysInMonth(Year,Month)
Dim dt As New DateTime(Year,Month,Day)
While True
Select Case dt.DayOfWeek
Case DayOfWeek.Saturday,DayOfWeek.Sunday
Day -= 1
dt = New DateTime(Year,Month,Day)
Case Else
Return
End Select
End While

📝 𝐏𝐫𝐨𝐜𝐞𝐝𝐮𝐫𝐞
➊ Use Assign activity to set the value for month
➋ Use Assign activity to set the value for year
➌ Write the code in Invoke Code activity
➍ Add the arguments (Input & Output)
➎ Use WriteLine Activity to write the output to the console

✍ 𝗞𝗲𝘆 𝗪𝗼𝗿𝗱𝘀
→ Get Last Working Day
→ Get Last Working Day in a month
→ Get Working Day
→ Letzter Arbeitstag in einem Monat ermitteln
→ VB.Net Code
→ Get last working day in a month
→ Get working days
→ Programmierung mit VB.Net
→ Date Manipulation
→ Get first day from a month
→ Get first day from calendar

Рекомендации по теме
Комментарии
Автор

Thanks Mahmoud. That helped :)
What change should I do if want to get/return the complete date as DateTime type and not just the Day?

achintyaagarwal
Автор

i want to get the 3rd working day how can i achieve it

vishalnachankar