Get Text From Website

Hi All,

I am a rookie as i have just started using UI Path Studio.

I have a small requirement where in the get Text function gets a date from a table from a website and stores it into a variable.
All i have to do is to convert that variable into Date Time and then use it for comparison.

Please bare with me as i am a rookie.

Any ideas as to how this has to be done.

Thanks

Hi @jayant_khushalani

You can convert you datetime variable to required format in this way

yourdatetimevariable.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture).ToString

See this sample-

Main.xaml (6.8 KB)

Thanks,
Prankur

Hi Prankurjoshi,

So in the above process i am trying to get the value in a variable and i am trying to convert it to date time. how should i do this?

Sample shows that too, lets a you have a date value in String type then you just need to cast that like this

cDate("YourStringWhichShouldbeindateformat")

image

Thank you worked like a charm.

I have one more query regarding the date formula. How do i check the date which i have taken in a variable exists between previous 3 months. if you could help me out on this i would really appreciate it.

You can play with something like this

DateRange.xaml (6.7 KB)

Thanks,
Prankur

You can take another variable in which you initialize value like OldDate=CurrentDate.AddMonth(-3) and compare with your OldDate<=actualDate.

Hope this will help!

Hi Prankur,

I tried the same formula but it throws an exception saying “Now is not a member of integer”.

Do i need to install a package for this?

Also the variable i am using is of Generic Value.

I Hope it does not affect it.