- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-04-21 01:14 PM
I have requirement to calculate start date of week against the Week number .
Input would be Week number ( 14, 17...)
Output should be Start date of respective week
For example :
in Year 2021 for week number 14 , Start date of week is 05-04-2021
in Year 2021 for week number 17 , Start date of week is 26-04-2021
I have an option to calculate it in Excel and read the same . But I would like a suggestion to get in Blue prism action either by code stage with out using Excel VBO
Thanks
Krishna
------------------------------
Krishna Elapavuluri
TEchnology Consultant
DXC.technology
Asia/Kolkata
------------------------------
Answered! Go to Answer.
Helpful Answers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-04-21 05:32 PM
------------------------------
Thanks & Regards,
Tejaskumar Darji
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-04-21 02:26 PM
I realized it might take longer for me to explain the steps to create an object than for me to just upload it. So here's a quick object I threw together with the code from that StackOverflow answer. You'll want to test it out. I make no guarantees. 😃
---
EDIT: I'm the worst. I renamed the code stage right before export before. See my next response for a slightly updated object. Oops! 😃
---
The attached object was created in 6.8. If you have a version earlier than 6.6, it's gonna get imported all wonky. It should still work and you can drag the stages around to fix it.
------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-04-21 02:32 PM
------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-04-21 07:05 PM
Please also find the native Blue Prism "No Code" solution for this problem.
Only dependency --> Utility-Date and Time Manipulation (Get it from DX simply)
XML file attached. Hope it helps.
------------------------------
Thanks & Regards,
Tejaskumar Darji
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-04-21 07:09 PM
------------------------------
Thanks & Regards,
Tejaskumar Darji
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-04-21 08:12 PM
I'm intrigued to try that solution. But I have a couple of questions.
- Would it support previous years or only the current year? I imagine Krishna may only need it to work for the current year, but it'd be cool if it worked for previous years as well. Part of the reason I grabbed custom C# code is that it was designed specifically to handle difficult years.
- My Utility - Date and Time Manipulation VBO doesn't have an action called 'GetWeekDay', and I'm using 6.10.1. Are you sure that isn't a custom action that your organization added? In any case, I would think it's simple code, but I'm not sure what output it's going for. The Utility - Date and Time Manipulation VBO on the DX also doesn't have that action.
------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-04-21 12:35 PM
Thank you Dave for providing valuable suggestions on 1. To extend the logic to get input year as well and 2.Dependency on Utility.
Dave is right that Utility - Date and Time Manipulation VBO from DX doesn't have an action called 'GetWeekDay' (I'm not sure how I got it though)
To eliminate dependency from that Utility I've updated the solution and now not using that Utility anymore.
Also added Input parameter I_Year to be passed as input, and in case no input year passed solution will take the current year by default.
Please find the updated XML file.
And yes it is working for past years as well.
Feel free to provide feedback and suggestions.
------------------------------
Thanks & Regards,
Tejaskumar Darji
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-04-21 02:38 PM
Thanks for your solution,
Sorry for late reply ,
When i tried to import the xml file , i am getting the following error
can you throw light on this error .
'dd-MM-yyyy' is an unexpected token. Expecting white space. Line 109, position 45. |
<calculation expression="FormatDate([Date],"dd-MM-yyyy")" stage="O_Start Date Of Week"/>
I am using BP 6.7
Thanks
Krishna
------------------------------
Krishna Elapavuluri
TEchnology Consultant
DXC.technology
Asia/Kolkata
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-04-21 05:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
22-04-21 02:07 PM
Now I am able to use the Process.
However I have made few changes as present process still looking for Utility - Date and Time Manipulation VBO
Thanks
Krishna
------------------------------
Krishna Elapavuluri
TEchnology Consultant
DXC.technology
Asia/Kolkata
------------------------------
