question

David_G avatar image
David_G asked

SQL Code - Worldwide Clock

Hi All, I have been all over google searches etc and just can't find out how to produce the code that would show me the time for preset countries that refreshes in real time.

I currently have the following code that sort of does the job but just won't automatically fresh;

SELECT GETDATE() 'GMT', 
			DATEADD(hour,-6,GETDATE()) 'Provo',
			DATEADD(hour,+3,GETDATE()) 'Bucharest',
			DATEADD(MI,330,GETDATE()) 'India',
			DATEADD(hour,+8,GETDATE()) 'China'

Does anyone know how better to write this??

Anything would be massively appreciated,

Thanks,

sql-server-2008sql
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ThomasRushton avatar image ThomasRushton ♦♦ commented ·

What do you mean, show you the results in realtime? You mean, sit there running the query every second? In SSMS?

0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.