Micro Focus QTP (UFT) Forums
How can I fetch server time using function Now or any other function? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How can I fetch server time using function Now or any other function? (/Thread-How-can-I-fetch-server-time-using-function-Now-or-any-other-function)



How can I fetch server time using function Now or any other function? - blanchedsouza - 05-15-2008

In my application, when user clicks on Add Name and Date button,
it adds name of the user, date, and current time in the notes text box.

it does not add the current time as system time, but adds server's system time.

Could you please tell me any function to fetch server time?

e.g. if link is http://abc/xyz

then xyz is application name and abc is server machine name.
It fetches the system time of machine abc (which is not in INDIA)


Thanks,
Blanche


RE: How can I fetch server time using function Now or any other function? - Narasimharao SV - 11-07-2009

Hi Blanche,

I dnt think we have a built in function for fetching server time. It allways point to local machine as QTP is placed in the local machine. Believe i m correct.

Narasimha Rao SV


RE: How can I fetch server time using function Now or any other function? - Ankur - 11-07-2009

Check out the article on WMI with QTP . This can help you.

In the code mentioned there, instead of

Code:
strComputer = "."

You can use

Code:
strComputer = <Your target machine address>