Solved

How Do i run GETUTCDATE()

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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Suggested Solutions

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

710 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