Thank you in advance
Hi, we want a variable timing here…like it is reading input time as system’s time including AM or PM and then converting into this. If you can suggest for same?
@anjasing - Are you looking something like this…
now.tostring("h:m tt").split(":"c)(0) + "-" & cint(now.tostring("h:m tt").split(":"c)(0))+1 & now.tostring("h:m tt").split(" "c)(1)
Hope this helps…
Thank you It worked. If you could help in like how to select this Time Range(if we take it as input) in a dropdown as mentioned below?
Thanks…Since this is related to UI Automation I would suggest to open up a new forum post …
Sure Thanks
could you please help in providing timerange output in this format?
Today, 3:00 PM - 4:00 PM
with same logic you’ve mentioned before? like mentioned in image
I got till this by logic
var = "Today, “+now.tostring(“h:m tt”).split(”:“c)(0) + “:00 " & now.tostring(“h:m tt”).split(” “c)(1)+” - " & cint(now.tostring(“h:m tt”).split(”:“c)(0))+1 & now.tostring(“h:m tt”).split(” "c)(1)
but not able to put 10:00 like this here
if you could please help?
@anjasing - How about this…
"Today, " +now.tostring("h:00 tt") + " - " + now.AddHours(1).tostring("h:00 tt")
Above logic will automatically add hours from the current time and identifies the PM and AM…Because if the time is 11 am then we have to add 11 am - 12 PM…similarly if its 11 PM then 11PM - 12 AM…
Please try and let me know…
Thank you so much It was a lot help
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.