Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2922
  • Last Modified:

difference between two datetime values?

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
yussufawad
Asked:
yussufawad
  • 2
1 Solution
 
SteveBayCommented:
uses DateUtils;
..
car Seconds : Int64;
..
Seconds := SecondsBetween(Date1,Date2);
0
 
SteveBayCommented:
Edit:
car Seconds : Int64;
Should be
var Seconds : Int64;
0
 
yussufawadAuthor Commented:
thank you
0
 
rfwoolfCommented:
Add dateutils to your uses list,
then use SecondsBetween
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now