Solved

SQL date chnaged to datetime

Posted on 2009-05-06
3
207 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
OPENDATASOURCE 8 31
SQl works but add Having  by null or value 11 42
SQL Select * from 6 30
How to check data in sql table 11 38
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
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.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

12 Experts available now in Live!

Get 1:1 Help Now