Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I fetch server time using function Now or any other function?
#1
Solved: 10 Years, 8 Months, 3 Weeks ago
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
Reply
#2
Solved: 10 Years, 8 Months, 3 Weeks ago
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
Reply
#3
Solved: 10 Years, 8 Months, 3 Weeks ago
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>
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem With conversion function wajid 3 1,428 10-01-2018, 01:16 PM
Last Post: wajid
  Passing Object to Function Mozza 2 1,490 08-02-2018, 03:22 AM
Last Post: Mozza
  Function That Creates WebLink Variables Eitel13 3 1,220 07-17-2018, 03:25 PM
Last Post: Ankur
Smile How to join sub strings in UFT without using join built-in function? chetna 1 1,733 07-05-2018, 05:39 PM
Last Post: Ankur
  Pass reference to datatable into function smallsteve 2 1,880 09-28-2017, 09:18 PM
Last Post: smallsteve

Forum Jump:


Users browsing this thread: 1 Guest(s)