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
Solved

How could I convert from GMT to british summer

Posted on 2008-10-14
2
353 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how the fundamental information of how to create a table.

840 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