Solved

difference between two datetime values?

Posted on 2009-07-09
4
2,908 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 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi, TImage, Png 2 54
How to add columns to a RAD Studio FMX grid at design time 1 59
Get weeknumber and year from date 4 56
Code planning methods/tools? 5 56
This is about my first experience with programming Arduino.
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 …

734 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