Link to home
Start Free TrialLog in
Avatar of d_chenxin
d_chenxin

asked on

Query system time from linked server

I set up a linked server in my local sql server and my sql like this:

select DATEDIFF(day, T.running_Date, GETDATE()) AS [Cycle time],
FROM   Linkedserver.testdb.dbo.testtable T

running_date is the linked server time, but getdate() function just return my local sql server system time. How can I get linked sql server system time, pls. help!

thanks a lot!

Sidney
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of d_chenxin
d_chenxin

ASKER

Thanks you so much!