Solved

How could I convert from GMT to british summer

Posted on 2008-10-14
2
349 Views
Last Modified: 2012-05-05
I am looking to convert times that are in GMT to british summer,

How would i do this?
Thanks
0
Comment
Question by:meteorelec
  • 2
2 Comments
 
LVL 39

Accepted Solution

by:
BrandonGalderisi earned 500 total points
ID: 22713107
Assuming your server is set to that time, you can calculate time local to the server using this method.


dateadd(n, datediff(n, getutcdate(),getdate()), YourDateField

The problem with this approach is that if your SQL server is in a different time zone than your front end displaying it, the date will be local to the SQL server.
0
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22713112
forgot closing )


select dateadd(n, datediff(n, getutcdate(),getdate()), YourDateField) from YourTable
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

757 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

22 Experts available now in Live!

Get 1:1 Help Now