duration

Calculate Video Duration

I suck at math. I need to figure out how to calculate a video duration with only a few examples of values. For example, a value of 70966 is displayed as 1:10 minutes. A value of 30533 displays as 30 seconds. A value of 7007 displays as 7 seconds. ...

How to convert in SQL the number of seconds into a human-readable duration?

In a SQL-database I make some selects, that get an duration (as result of a subtraction between two dates) in seconds as an int. But I want to format this result in a human-readable form like 'hh:mm' or 'dd:hh'. Is that possible in SQL and how can I realize this? ...

SQL query to calculate visit duration from log table

Hi! I have a MySQL table LOGIN_LOG with fields ID, PLAYER, TIMESTAMP and ACTION. ACTION can be either 'login' or 'logout'. Only around 20% of the logins have an accompanying logout row. For those that do, I want to calculate the average duration. I'm thinking of something like select avg(LL2.TIMESTAMP - LL1.TIMESTAMP) from LOGIN_LOG L...

Determining the length of a user's visit based on SQL timestamps

Hi everyone, I am divided between using a C# implementation and a pure SQL 2005/2008 implementation. I need to determine the length of usage based on timestamps of their last actions. My table contains "friendID" (uniqueIdentifier) and "lastAction" datetime. Here is an example: Bob, 1:00 PM Bob, 1:01 PM Bob, 1:20 PM Bob, 1:25 PM...

Java: calculating duration

I created the following code to calculate the duration between two timestamps which can come in two different formats: public class dummyTime { public static void main(String[] args) { try { convertDuration("2008-01-01 01:00 pm - 01:56 pm"); convertDuration("2008-01-01 8:30 pm - 2008-01-02 09:30 am"); } catch (Exception e) { e.p...

Duration vbscript (vbs) function

Is there a function to convert a specified number of seconds into a week/day/hour/minute/second time format in vbscript? eg: 969234 seconds = 1wk 4days 5hrs 13mins 54secs ...

How can I pause Perl processing without hard-coding the duration?

I have a Perl script that contains this code snippet, which calls the system shell to get some files by SFTP and unzip them with WinZip: # Run script to get files from remote server system "exec_SFTP.vbs"; # Unzip any files that were retrieved foreach $zipFile (<*.zip>) { system "wzunzip $zipFile"; } Even if some files are retr...

Using a duration field in a Rails model

I'm looking for the best way to use a duration field in a Rails model. I would like the format to be HH:MM:SS (ex: 01:30:23). The database in use is sqlite locally and Postgres in production. I would also like to work with this field so I can take a look at all of the objects in the field and come up with the total time of all objec...

Ruby: how do I calculate a duration given 2 datetimes from a CSV file?

I have a number of CSV files which contain start and finish times. I can use FasterCSV to parse the files, but I don't know the best way to get the duration in Ruby. Here are the values in my hash generated for each row of the CSV files. start time: Mon Jul 20 18:25:17 -0400 2009 end time: Mon Jul 20 18:49:43 -0400 2009 ...

Mono ASP.Net Web Service CacheDuration hit ratio, under Linux.

I have developed an ASP.Net Web Service targeting Mono. I have deployed it to an OpenSUSE 11.1 VM running Mono under Apache. Is there a way to monitor the @OutputCache hit ratio for my ASP.Net app deployed for Mono under a Linux OS similar to the Windows Performance Monitor, for example? This does not have to necessarily involve perfo...

How do you get an iphone MPMoviePlayer video's total time?

I just want to figure out how to get a video's total time in seconds. Is there video metadata that loads or something? ...

JavaFX: formatting Duration into String?

Is there some kind of built-in method or a simple function that will convert Duration into a string in the hh:mm:ss format? For example, I am looking for something that would convert a Duration of 123402 ms into a String of "2:03". ...

how to get video file duration in C#

hi I wants to get video file duration in C#. I have the to get video file duration but code works only local computer. If i deploy my code on server and upload a video file then this code gives error. I m using the following code to get video time. using QuartzTypeLib; string file1 = "c://ds.mpeg" IMediaPosition m_objMedi...

How do you calculate an end time based on start time and duration?

I'm building a event calendar and pass a start time to PHP, in the format of 2009-09-25 15:00:00. A duration gets passed as well, that might be in the format of 60 minutes or 3 hours. Converting from hours to minutes isn't the problem. How do you add a length of time to an established starting point to correctly format the end time? ...

Software estimation speed and accuracy

Let's say you have a project that will involve two web applications (that will share DAL/DAO/BO assemblies and some OSS libraries): a semi complex management application that uses Windows Live ID for authentication and is also capable of communicating with various notifier services (email, sms, twitter etc.), targeted notifiers being a...

Web service call duration

My team has some data stored in a database which other teams in our company are interested in getting, and we're planning to build some web services, so that they don't have direct access to our database. We aren't running very complex queries (consider it instant, once we're interested in the overhead), and we're wondering how long a w...

Oracle Duration Function

Why isn't my PL/SQL duration function working correctly? In the query below, I manually calculate the 'hh:mm' the same way as in the function below. However, I get different results. Calling Query: WITH durdays AS (SELECT SYSDATE - (SYSDATE - (95 / 1440)) AS durdays FROM DUAL) SELECT TRUNC (24 * durdays) AS durhrs, MOD (TRUNC ...

How can I speed up the animations when using FluidKit?

I've using FluidKit in a WPF application and would like to speed up the animations. SlideTransition slideTransition = Resources["SlideTransition"] as SlideTransition; slideTransition.Direction = Direction.LeftToRight; slideTransition.Duration = new Duration(new System.TimeSpan(1000)); //does not work TransitionContainer.Transition = sli...

SQL query to calculate part of visit duration from log table

Hello, I have a table which logs the userid, course, sessionid and requestdate each time a webpage is loaded. I want to calcuate the duration per userid for a given courseid. It is problematic to do this due to overlapping timespans. The data provided here should result in 10 minutes duration per user for course 1. I can't seem to get ...

jQuery activate a mouseover function only if the mouse holds on the element

Hi, I would like to activate a .mouseover function only if the mouse lays down on the "trigger" element for a predetermined duration (e.g. 500 milliseconds). E.g. $('.featured').mouseover(function () { $('.feat-txt').fadeOut("fast"); }); Only if the mouse is positioned over the .featured element for at least 500 milliseconds...