(I am a beginner) . I was trying to change the variable type but it's not allowing me. I can only keep the default (string)

Hi @akheelahmad,
The output variable of this activity is String so you can not change this to any other type however you can use String normally then after get the text value you want you can convert type after that like below link hope my answer solved your question if you still has issue please update us :slight_smile:

What type variable is InvoiceDate? I assume you have it as an integer.
You are assigning it to an argument of Type String?
Please show you variables panel.

I was building the bot watching a video and the instructed changed the variable type directly after creating the variable which was by default a string.


@akheelahmad Welcome to UiPath community

Change the variable type from DateTime to String

Yes, I can change it back to default (string). Why can’t I change to the DateTime variable as my instructor did? He got no errors. I wanna change to the DATE so that I can add .systemDateTime in a writeline which is not allowing me now.

@akheelahmad Your instructor converted from Datetime to string type. ie InvoiceDate.ToString(“dd/MM/yyyy”)

First, he directly changed the Variable type to sysDateTime, and then in Write Line, he wrote: InvoiceDate.ToString(“dd/MM/yyyy”)

@akheelahmad After conversion it will print in write line Otherwise it will throw error

If it is video on youtube, then could you post the link to it. So we can get better understanding of the issue.

Yes, but the problem is I can’t directly edit the Variable type from the variable table.

@akheelahmad You can change directly in variable panel

Let me upload

I get the error if change to other VARs, I can only select the String

As others has told you. The “Get Text” activity ONLY store data to variable that is type String. It display Error because you gave it variable that is not in String type.

@akheelahmad You are trying to extract data so extracted data should store only in string type not in int type

How is this person changing the Var type: - YouTube

Hi @akheelahmad ,

The Youtube video link shared is a private video link. Hence, we will not be able to access/view it unless given access to.

Maybe it’s not right to shared the video as it might be a private video that was shared explicitly for you, as you might have paid or subscribed for that video.

Do Check the video once more on your own.

Also, Try Performing the Get Text Step again from beginning and check if you are able to resolve the error.