I am getting this error:- If: Input string was not in a correct format

whats wrong with this condition:

(Convert.ToDateTime(row(“Usage”+vblf+“Beg Date”))<now)

i am getting this error : If: Input string was not in a correct format

Usage Beg Date is a column name, i gave vblf because the column name is present in two lines in the same cell. i am comparing the the usage date to the current date

@sybasha

You can take my below post as a reference to convert before making the IF condition

Mark as solution if this helps

Thanks

Hi @sybasha

Instead of this (Convert.ToDateTime(row(“Usage”+vblf+“Beg Date”))<now)

Use this CDate(row(“Usage”+vblf+“Beg Date”))<DateTime.Now

Hope this may help to solve your query
Definetly Mark this as solution if this helps you and like it :innocent:

Happy Automation :raised_hands:

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

1 Like

Hi @sybasha

If my above solution worked for your issue then plzz mark it as solution.

Happy Automation :raised_hands:

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

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.