QTP Forums

Full Version: How can I fetch server time using function Now or any other function?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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
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>
Reference URL's