?
Solved

How Do i run GETUTCDATE()

Posted on 2003-11-10
4
Medium Priority
?
823 Views
Last Modified: 2011-10-03
Can someone give the syntact to get the GMT date from sql, thanks
0
Comment
Question by:tomhoran
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 200 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

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.
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

719 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