Hi all,
Kindly refer to the attachment.
Column C has a list of city names.. Is there a way we can pull the current time from any website or internet server.
If not only the time zone they fall under
Hi all,
Kindly refer to the attachment.
Column C has a list of city names.. Is there a way we can pull the current time from any website or internet server.
If not only the time zone they fall under
You're looking for something like the code below, I suspect.
Set references to Microsoft XML and Microsoft HTML
Please click the * below if this helpsPlease Login or Register to view this content.
Last edited by JasperD; 04-05-2015 at 06:25 AM. Reason: Forgot to implement the replace for spaces in countries
Please click the * below if this helps
Hi Jasper.. thanks for the help..
I did try running the code .. but it gave me an compile error message.
Attached screenshot.. Kindly assist
it was the reference.. i was able to run it... checkin it now
ATTACHED output of the VBA.... we almos there...
the D column is giving us result in non english, also, can we not just search with the City name if that helps for more results
Kindly advise
You can't search with just city name.
The result will always be in your system language, since that's how the website presents it.
If you find another site that gives the result in English and is flexibile enough to search for the city AND find what you need, then feel free to let me know.
But be careful with just looking for city, because if you'd look for "London", you'd get 4 hits in 3 different countries.
I agree to your feedback...
Can we try http://www.thetimenow.com/
That site poses the exact same problems as the one I used.
I don't really feel the necessity to change it around, but feel free to adjust the code to your liking.
As long as you don't type the country / state / city names exactly as expected by the site, you'll always going to get misses.
Okay...
Jasper, just wanted to get this clarified further.. When i execute this code.. I get unknown address for almost 40 city's.. But when I search for them in the website.. It works absolutely fine.. Are we missing anything here..
Please advise..
Try
Please click the * below if this helpsPlease Login or Register to view this content.
This won't find the time for:
"Oakville, Canada" = Doesn't exist on the site
"Beyazit-Istanb" = "Istanbul"
"Sharm el Sheik" = "Sharm ash Shaykh"
"Moscow, Russian Federation" = "Moscow, Russia"
"Victoria - Mah, Seychelles" = "Victoria, Seychelles"
"Bangalore - India" = Doesn't exist on the site
"Enfield, Canada" = Doesn't exist on the site
etc.
this works absolutely fine.. Just that after few min when I exceute same code again, it does not update. It gives the same result of the first execute
I have to relaunch excel file and run the code again to get an updated time
Gotta love Internet cache :-)
Try
Please Login or Register to view this content.
Typing from phone, so untested
Last edited by JasperD; 04-06-2015 at 11:15 AM. Reason: Tested it and included cell.activate to show where you are...
supe supee.. double cheerz to u... thanks a lot... that work perfect
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks