Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8078

Re: Query to get database date, not server date

$
0
0

Hi Kowal,

 

Thank you for the info, it is really helpful.

 

Anyway, I had create the query as below, somehow it will not display hour and minute, can help?

 

Declare @serverdatetime as varchar(20)

SELECT @serverdatetime=cast(GETDATE() as varchar)

 

SELECT DATEADD(hour,-15,@serverdatetime)

 

Thanks


Viewing all articles
Browse latest Browse all 8078

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>