troubleshooting Question

T-SQL Time

Avatar of fjkaykr11
fjkaykr11 asked on
Microsoft SQL ServerSQL
4 Comments3 Solutions304 ViewsLast Modified:
I want to verify the correct time in T-SQL 2000.
To specify today's date from 12AM until 11:59PM
Would it be specified like below?
For SET @startdate = '2012-12-20 00:00:00'
SET @enddate = '2012-12-20 23:59:59'

I want to be sure about the 23:59:59 because I found some existing queries on a SQL Server 2000 and it is displayed as 00:00:00 to 11:59:59

"Batchelor", Developer and EE Topic Advisor
Join our community to see this answer!
Unlock 3 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros