Solved

How Do i run GETUTCDATE()

Posted on 2003-11-10
4
782 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
query execution hang 5 29
This query failed in sql 2014 5 30
export sql results to csv 6 35
SQL Server 2012 - Merge Replication Issue 1 20
Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to shrink a transaction log file down to a reasonable size.

776 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