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: 11 Years, 3 Months, 4 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: 11 Years, 3 Months, 4 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: 11 Years, 3 Months, 4 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,744 10-01-2018, 01:16 PM
Last Post: wajid
  Passing Object to Function Mozza 2 1,889 08-02-2018, 03:22 AM
Last Post: Mozza
  Function That Creates WebLink Variables Eitel13 3 1,492 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,929 07-05-2018, 05:39 PM
Last Post: Ankur
  Pass reference to datatable into function smallsteve 2 2,086 09-28-2017, 09:18 PM
Last Post: smallsteve

Forum Jump:


Users browsing this thread: 4 Guest(s)