?
Solved

Sql Server and GMT

Posted on 2005-05-13
2
Medium Priority
?
224 Views
Last Modified: 2010-03-19
Hi,

I am making some changes to an application.

I am adding 2 new fields.
  IncidentDate (smallDateTime)
  IncidentGMTTime (TimeStamp)

Can Sql Server store DateTimes and Timestamps in GMT format? If so How.

I have a mighty headache and am prolly being a dummy.

/Just wants to go home for the day
0
Comment
Question by:jwithrow
2 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 400 total points
ID: 13998610
You can use the GETUTCDATE() function.
0
 
LVL 11

Assisted Solution

by:andrewbleakley
andrewbleakley earned 276 total points
ID: 13999485
From BOL:
--------------------

GETUTCDATE
Returns the datetime value representing the current UTC time (Universal Time Coordinate or Greenwich Mean Time). The current UTC time is derived from the current local time and the time zone setting in the operating system of the computer on which SQL Server is running.

If everything is set up right this will do it.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
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.
Suggested Courses

621 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