Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

difference between two datetime values?

Posted on 2009-07-09
4
Medium Priority
?
2,915 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
[X]
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
  • 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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

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.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
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…
Suggested Courses

670 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