Facing error in date format?

Hello Every RPA Developer. I am new in UiPath.
While adding date in write line i am getting an error.
Kindly help me in this.
Error is given below.
Argument ‘TextString’: BC30512: Option Strict On disallows implicit conversions from ‘String’ to ‘Date’. The selected value is incompatible with the property type.

@Amit_Pandey2 ,

Change the datatype of InvoiceDate to system.datetime

image

it must be as

Regards,
Dheerendra Vishwakarma

@Amit_Pandey2,

Welcome to UiPath Community :tada:,

You are facing this error because Get Text activity will be returning you String Data Type and String datatype you could not store in DateTime Data Type.

You should be changing the Datatype of InvoiceDate to String. This will give you extracted date into a string.

If you want to do any calculations/comparisons around the InvoiceDate then you will have to Parse the string date to DateTime using DateTime.TryParse Method.

Thanks,
Ashok :slight_smile:

Thankyou so much for your support.

1 Like

Thank You so much for your support.

1 Like