Solved

SQL date chnaged to datetime

Posted on 2009-05-06
3
214 Views
Last Modified: 2012-05-06
I have a DB that has a date only.
I want to take the date and add 10:00
to each day.

So my querys will work with my other DB's that use 10:00am in the query.

any help?

Sam
0
Comment
Question by:SamRunyon
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 500 total points
ID: 24321443
Use
DATEADD(hour, 10, YourDateColumn)
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24321446
>>I have a DB that has a date only.<<
Incidentally all datetime data types have time.  In your case it is set to midnight or 0 hours.
0
 

Author Closing Comment

by:SamRunyon
ID: 31578812
thanks for the help.
Sam
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
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.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

911 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