Solved

How Do i run GETUTCDATE()

Posted on 2003-11-10
4
758 Views
Last Modified: 2011-10-03
Can someone give the syntact to get the GMT date from sql, thanks
0
Comment
Question by:tomhoran
  • 2
  • 2
4 Comments
 
LVL 15

Expert Comment

by:namasi_navaretnam
ID: 9718163
declare @mydate datetime
select @mydate = GETUTCDATE()
print @mydate

HTH
0
 

Author Comment

by:tomhoran
ID: 9718232
HTH,

I'm trying to get this value into a VB program, how do i do that? Thanks. Tom
0
 

Author Comment

by:tomhoran
ID: 9718234
HTH,

CAn i do it via a select statment or comething??
0
 
LVL 15

Accepted Solution

by:
namasi_navaretnam earned 50 total points
ID: 9718361
Yes.

Run this query the same way you run other queries in VB. If using ado execute this sql and get the result into a resultset object and then read gmtdate field.

select  GETUTCDATE() as gmtdate


0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now