- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-07-21 04:21 AM
I am supposed to create the file folders for each week with Monday date, basically bot should check for the current day and create the folder with this week moday. Please can anyone help to get the expression for this
------------------------------
Miya
------------------------------
Answered! Go to Answer.
Helpful Answers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-07-21 07:00 AM
This is the formula for calculating the Monday of a given day. Use code stage.(Language is Visual Basic)
Input argument is "Today", data type is Date.
Output argument is "Monday", data type is Date.
Add "mscorlib.dll" and "System.Runtime.dll" to External References.
Monday = Today.AddDays((Today.DayOfWeek - 1) * -1)
------------------------------
Mitsuko
Asia/Tokyo
------------------------------
Mitsuko
Asia/Tokyo
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-07-21 06:38 AM
You can use the expression - FormatDate(Today(), "ddd") .
Get the Todays Day and then you can put a choice stage and subtract the days to get this week Monday.
For Ex: FormatDate(Today(), "ddd") Result will be Wed
Based on the result you can go to the Wednesday flow and get the date by using expression - AddDays(Today(), -2)
Similarly for rest of the days. If you need Day also please use the FormatDate Expression.
Thanks,
Vikash
------------------------------
Vikash Anand
Senior Software Engineer
Ernst and Young
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-07-21 07:00 AM
This is the formula for calculating the Monday of a given day. Use code stage.(Language is Visual Basic)
Input argument is "Today", data type is Date.
Output argument is "Monday", data type is Date.
Add "mscorlib.dll" and "System.Runtime.dll" to External References.
Monday = Today.AddDays((Today.DayOfWeek - 1) * -1)
------------------------------
Mitsuko
Asia/Tokyo
------------------------------
Mitsuko
Asia/Tokyo
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-07-21 09:35 PM
------------------------------
Miya
------------------------------