I hope everyone doing good.
I am working on a web automation it is based on health insurance.
Here I need to scrap a data (starting date and the end date) if the start date or end date is not available then I need to mention default date as 01\01\2022 for the year 2022 if the year 2023 then need to mention 01\01\2023 and so on the date format should be in format ie. mm/dd/yyyy…
How to do that i.e. how to mention the default date as 01\01\2022 or 01\01\2023 and so on .
please help me in this.
thanks in advance
Is it a table where you want to insert some default value ?
Try below expression.
strDate = New DateTime(1,1,Now.Year).ToString("MM\dd\yyyy")
In excel,need to insert only the start date is not available if the start date available then I need to enter the same date for example if the portal contains 04/04/2022 then i need to select the 04/04/2022 rather than selecting the default date
Below PCM Information.
there is catastropic cap & deductible(below the “Effective (1/1/2022”-12/31/2022)
if Effective is not present at that time i need to write the default value to the excel
So you will using get text and use an IF condition to check if the result of get text has some value.
If the value is present you will pass the get text output variable to the write range input.
If the value is not present, you will pass the default date as
new DateTime(Now.Year, 01, 01).ToString("mm/dd/yyyy")
Thanks for your reply will try and let you know
Try this :