Hi, I have a file which I receive on any day from 1st of every month to 5th date. I have below queries:
1. How can I extract date on which I have received file/system date.
2. can I store it in a variable.
3. How to check if the date is between 1-5th of every month. it should give an alert if file is received after 5th.
3. Now after extracting date, I need to extract month from the date and then have to compare/ensure that the value field for current and previous months is not 0.
Below is the sample data:
File Date | 3/4/2019 | ||
Month Extracted | April | ||
Data Set | |||
Name | Month | Values | Flag (Y/N) |
A | Jan | 55,759 | here, the file month is April, and Jan<April then Flag=Y |
B | Jan | 58,416 | Y
|
C | Jan | 28,071 | Y |
A | Feb | 68,328 | Y |
B | Feb | 88,853 | Y |
C | Feb | 64,532 | Y |
A | Mar | 33,014 | Y |
B | Mar | 97,231 | Y |
C | Mar | 27,733 | Y |
A | Apr | 9,765 | Y |
B | Apr | 91,650 | Y |
C | Apr | 96,848 | Y |
A | May | 0 | N since Current Month is april, so have no values for May and June |
B | May | 0 | |
C | May | 0 | |
A | Jun | 0 | N |
B | Jun | 0 | N |
C | Jun | 0 |
Solved! Go to Solution.
Hi @SamSurya , hopefully this attached workflow will help you with a few things.
To extract the date on which the file was created, you can use the Directory tool to get the CreationTime.
You can add Constants in the Workflow configuration, but in your case I'm not sure you need to, you could use the Directory tool and Test tool to check that the date of the file not created after the 5th, see the attached example..
Hi Mark,
thank you!!! this is awsome....
Just one thing here, I need to fetch File date from the database where its get uploaded by a team every month any day between 1st to 5th of every month and then have to build a check that if file is received after 5th day then it should mark it as "Late".
I have provided the file date just as an example, in actual file, there would be no date available.
Please help
Hi @SamSurya
No problem. I misunderstood the format of your file, often you get a report file that has header information then followed by the data, which I thought you had in your case.
In this case I've change the workflow to read a file C:\Temp\Sample File.xlsx, if your filename changes you can use a wildcard. I've added the directory tool to get the creation date information, and then I add the Creation Day and Month to the Input of your file. I'm not sure if you want to stop the workflow if the creation date of your file is after the 5th, or if you want to add a Late column. This workflow does both so remove whichever you don't need. Hopefully that is what you are after...
Thankyou.... this works for me well.. cheers