Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get local time in other countries
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01134752
Message ID:
01134805
Views:
31
Mike

Thanks for that - I'll try it 2morrow - sorry to be so ignorant on this - the first 5 lines of your code I assume I copy as they are but the last 2 lines I'm not sure of - what would the code be if I wanted the local time in New York?

Colin

>
CREATE CURSOR myWebPage (content m)
>url="http://www.timeanddate.com/worldclock/full.html"
>objHTTP = CreateObject("MSXML2.XMLHTTP")
>objHTTP.Open("GET", url,.f.)
>objHTTP.Send()
>Insert into myWebPage (content) VALUES (objHTTP.ResponseText)
>MODIFY MEMO myWebPage.content
>
>>Mike
>>
>>Sounds good but how do I code the internet query from VFP6?
>>
>>>Do a query on this internet site, parse the page and do the calculation. This page gives you the current date and time for most places in the world.
>>>http://www.timeanddate.com/worldclock/full.html
>>>
>>>>Local computer is based in the UK - it needs to know what the local time is in Chicago where the package is going
>>>>
>>>>Colin
>>>>
>>>>>Wouldn't the local computer where the application is installed know the offset to GMT?
>>>>>
On Error *
>>>>>lcComputer = "."
>>>>>loWMIService = Getobject("winmgmts:\\" + lcComputer + "\root\cimv2")
>>>>>colItems = loWMIService.ExecQuery("Select * from Win32_TimeZone")
>>>>>For Each loItem In colItems
>>>>>	?"Bias: " + transf(loItem.Bias)  && Offset in minutes
>>>>>	?"Caption: " + transf(loItem.Caption) && Description of the setting
>>>>>	?"Daylight Bias: " + transf(loItem.DaylightBias)  && Daylight savings time setting
>>>>>	?"Description: " + transf(loItem.Description) && Description of the setting
>>>>>	?
>>>>>Next
>>>>>
>>>>>Or you can use the GETSYSTEMTIME() (GMT time) and make the diffence against the GETLOCALTIME() API to get the offset to GMT.
>>>>>
>>>>>>Hi
>>>>>>
>>>>>>I have a database which contains information about packages to be delivered all over the world - I want to be able to find out the local time at destination without having to calculate it manually
>>>>>>
>>>>>>So for example if I have a package to be delivered to Chicago I can automatically calulate that the time difference is 6 hours behind the UK
>>>>>>
>>>>>>Anyone ever done any work in this area?
>>>>>>
>>>>>>Thanks
>>>>>>
>>>>>>Colin
Specialist in Advertising, Marketing, especially Direct Marketing

I run courses in Business Management and Marketing
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform