Solved

difference between two datetime values?

Posted on 2009-07-09
4
2,888 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
Comment Utility
uses DateUtils;
..
car Seconds : Int64;
..
Seconds := SecondsBetween(Date1,Date2);
0
 
LVL 14

Accepted Solution

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

Author Comment

by:yussufawad
Comment Utility
thank you
0
 
LVL 13

Expert Comment

by:rfwoolf
Comment Utility
Add dateutils to your uses list,
then use SecondsBetween
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
This article will show, step by step, how to integrate R code into a R Sweave document
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 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

12 Experts available now in Live!

Get 1:1 Help Now