difference between two datetime values?

Posted on 2009-07-09
Last Modified: 2012-05-07
i have two date values of datetime at this format : 2009/07/08 11:20:17

and i wanna sea if difference between 2 values are 1 second or 2 seconds.

how can i check this in delphi?
Question by:yussufawad
  • 2
LVL 14

Expert Comment

ID: 24813948
uses DateUtils;
car Seconds : Int64;
Seconds := SecondsBetween(Date1,Date2);
LVL 14

Accepted Solution

SteveBay earned 500 total points
ID: 24813955
car Seconds : Int64;
Should be
var Seconds : Int64;

Author Comment

ID: 24814123
thank you
LVL 13

Expert Comment

ID: 24814381
Add dateutils to your uses list,
then use SecondsBetween

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

679 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