Error in Excel Date Formula

Hi Friends,

While Creating Data Array for creating worksheet, one column need to use date Formula("=Date(Year,Month,Day)"). But while doing automation the output excel sheet showing same equation format, when I double-click the cell then the value is changing to date format.

Example: Column A contains Month, Column B contains Day and Column C contains Year. I need Date in Column D. Output excel sheet showing “=Date(C2,A2,B2)”. WHen i double click the cell and press enter then it will changes to “08/15/2019”.

We entered the code as follows:
{Convert.ToInt32(row(0).ToString),Convert.ToInt32(row(1).ToString),row(3).ToString,"",("=DATE(2019,"+“A”+Counter.ToString+","+“B”+Counter.ToString+")"),row(2).ToString}

Can anyone help regarding this issue.

Hi, welcome to the community!
This in my example is working fine, maybe you are building the formula in the wrong way:

Hello Sir,

Thanks for your reply. I will try your method.

Hi @Senthil_anand

Try using the below thread :-

Mark as solution and like it if this helps you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

Hello Sir,

I tried your method. But result not come.

Hi, can you share some part of your process and excel so we can test?