?
Solved

DateTime SQL

Posted on 2006-05-09
6
Medium Priority
?
243 Views
Last Modified: 2009-07-29
How to get time in SQL query, I need a time 24 hrs from now.
0
Comment
Question by:karthikram
6 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1000 total points
ID: 16641565
select dateadd(day, -1, getdate())
0
 
LVL 21

Expert Comment

by:mastoo
ID: 16641568
select DateAdd( hh, 24, GetDate() )
0
 
LVL 34

Expert Comment

by:Brian Crowe
ID: 16641595
SELECT DATEADD(day, 1, GetDate())
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 16641617
>24 hrs from now.
My suggestion is 24 hours (1 day) before now... sorry
0
 

Author Comment

by:karthikram
ID: 16641840
I need for 24 hours before .
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 16641860
well, then my first suggest was correct ...
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

864 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