Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

difference between two datetime values?

Posted on 2009-07-09
4
Medium Priority
?
2,920 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 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
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?
Six Sigma Control Plans
Starting up a Project

916 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