Solved

difference between two datetime values?

Posted on 2009-07-09
4
2,898 Views
Last Modified: 2012-05-07
Hello,
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?
0
Comment
Question by:yussufawad
  • 2
4 Comments
 
LVL 14

Expert Comment

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

Accepted Solution

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

Author Comment

by:yussufawad
ID: 24814123
thank you
0
 
LVL 13

Expert Comment

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

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 …
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…

815 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

9 Experts available now in Live!

Get 1:1 Help Now