Solved

Convert time to sec

Posted on 2001-07-10
2
627 Views
Last Modified: 2012-06-27
Is there a SQL function that could
to convert, let's say, 15 min to 900 sec.

I have a specific need in which I need my
start and end times represented in
number of secs, vs. hh:mm:ss
0
Comment
Question by:ivanh
2 Comments
 
LVL 9

Accepted Solution

by:
samopal earned 75 total points
ID: 6271390
select datediff(s,StartDate,EndDate) as DifInSec

HTH
0
 
LVL 1

Author Comment

by:ivanh
ID: 6271461
Ugh, I foregot about the datediff function....

Thanks.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
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 to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

706 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

17 Experts available now in Live!

Get 1:1 Help Now