Solved

Convert time to sec

Posted on 2001-07-10
2
635 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
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.

630 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