Using DateDiff to calculate time of a phone call

Posted on 2003-03-10
Medium Priority
Last Modified: 2012-05-04
I want to calculate the time spent on each call, I believe i can use datediff formula, but where it asks for interval type, i dont know what they want..
Question by:it_lite
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
  • 3
  • 2
LVL 101

Accepted Solution

mlmcc earned 500 total points
ID: 8103133
Interval is a character to request time in days, months, etc

"d" for days
"m" for months
"h" for hours
"n" for minutes

You get a decimal number returned

Datediff ("d", {StartDate},{EndDate})
1.5 means 1.5 days


Author Comment

ID: 8103206
Thanks alot, is there one for seconds, that is what i will be dealing with mostly.
LVL 101

Expert Comment

ID: 8104697
Yes.  I think it is "s"


Author Comment

ID: 8104720
Thanks again, I tried "s" before you replied and it worked, I wish I had some points to give you for that...
LVL 101

Expert Comment

ID: 8106946
No problem.

By the way use "yyyy" for years "y" for some reason does days.


Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

752 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