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

x
?
Solved

Date conversion

Posted on 2006-05-06
2
Medium Priority
?
196 Views
Last Modified: 2010-04-05
Hi

I have 2 TDateTime vars, and:

TDateTime1 has earlier date/time
TDateTime2 has later date/time

i need to calculate the difference between those two TDateTime vars and get the difference in seconds

for eg if the difference will become 2d 12h 30m 24s then the final int will be: 217,824 seconds

calculation from 2d 12h 30m 24s to seconds is not a problem, but i dont know how to get the difference between those TDateTime vars

please help

thx in advance
0
Comment
Question by:szafran81
2 Comments
 
LVL 28

Accepted Solution

by:
2266180 earned 500 total points
ID: 16622678
uses dateutils;

function SecondsBetween(const ANow, AThen: TDateTime): Int64;
0
 

Author Comment

by:szafran81
ID: 16622900
thx m8
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses
Course of the Month11 days, 13 hours left to enroll

564 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