* 이번주 월요일 날짜 구하기 (오늘이 3월 18일 수요일이면, 3월 16일 월요일을 출력함.)
- 참고 주소 : https://forum.uipath.com/t/date-of-monday-in-the-current-week/27309/2
Assign the value as DateTime.Now.AddDays(-1*(7 + (DateTime.Now.DayOfWeek - DayOfWeek .Monday)) mod 7).Date.ToString |
* 지난주 오늘 요일 날짜 구하기 (오늘이 3월 18일 수요일이면, 3월 11일 수요일을 출력함.)
- 참고 주소 : https://forum.uipath.com/t/get-date-from-last-week/179260
Assign the value as DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd") |
* 지난주 화요일 날짜 구하기 (오늘이 3월 18일 수요일이면, 3월 10일 화요일을 출력함.)
- 참고 주소 : https://forum.uipath.com/t/date-of-monday-in-the-current-week/27309/5
Assign the value as DateTime.Now.AddDays(-7).AddDays(-1*(7 + (DateTime.Now.DayOfWeek - DayOfWeek.Tuesday)) mod 7).ToString("yyyy-MM-dd") |
오늘 날짜 - 7 - 1*((7+(오늘요일-구하는요일))을 7로 나눈 나머지 값) |
* 전월 1일 구하기 (오늘이 9월 17일이면, 8월 1일을 출력함.)
Assign the value as New DateTime(DateTime.Now.Year, DateTime.Now.Month-1, 1) |
* 전월 말일 구하기 (오늘이 9월 17일이면, 8월 31일을 출력함.)
Assign the value as New DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddDays(-1) |
'프로그래밍 > RPA' 카테고리의 다른 글
DataTable과 DataRow 이해하고 사용하기 (4) | 2020.03.20 |
---|---|
UiPath Self Study : StudioX (2020.03.17) - 2일차 / Done (0) | 2020.03.20 |
UiPath Self Study : StudioX (2020.03.16) - 1일차 (0) | 2020.03.16 |
Collection과 Array 의 초기화 (2020. 08. 07 수정) (0) | 2020.03.15 |
액티비티의 사용법을 잘 모를때 보기 좋은 Manual Site (0) | 2020.03.15 |