Hi everyone,
I need some help with my project.
I am trying to extract current time from a browser web page. Then I should substract this time from the current time.
Would you please suggest what is the best way.
Now I use get text activity to extract the time from the web page.
Hi,
It should be easy, just show us date format from website
1 Like
Gokul001
(Gokul Balaji)
November 24, 2022, 9:14am
3
HI @zhasmina.dimitrova
Check out this expression
StringDur= DateTime.Parse(WebsiteTime).Subtract(DateTime.Parse(DateTime.Now.ToString("hh:mm")))
Regards
Gokul
Gokul001
(Gokul Balaji)
November 24, 2022, 9:14am
4
Check out this thread @zhasmina.dimitrova
Regards
Gokul
rajat.jain
(Rajat Jain)
November 24, 2022, 9:16am
5
@zhasmina.dimitrova Tell us the format
@zhasmina.dimitrova
Checktime=DateTime.TryParse(timetext)
Currenttime=Date.Now
Time difference=checktime-currenttime
The date format from the website is hh:mm AM
I am getting it with Get Text activity as string, then convert to time?
Checktime=Convert.ToDateTime(strTime)
Yes,first convert it to time and then subtract it from current time
1 Like
Hello @zhasmina.dimitrova
If you don’t want to go with the expressions, you can directly sue the Modify Date activity.
Thanks
Gokul001
(Gokul Balaji)
November 24, 2022, 10:25am
10
Have you tried with this expression? @zhasmina.dimitrova
system
(system)
Closed
December 1, 2022, 11:57am
11
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.