Can anyone tell me how to do this?

System.DateTime.Now().
This returns the current time of the machine.

I want the time of server machine not the current machine

Your code isn't running on the server? Then where is it and what server do you want to get the time from?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.