drnadeem
asked on
Datetime diference?
I have two datetime strings in 2 edit boxes. How can I find the number of hours between these two values even if it exceeds 24 hrs.
eg: 7/21/2002 1:15:25 AM minus 7/22/2002 2:15:28 PM
thnks
eg: 7/21/2002 1:15:25 AM minus 7/22/2002 2:15:28 PM
thnks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try this:
Edit3.Text := DateTimeToStr((StrToDateTi me(Edit1.T ext) - StrToDateTime(Edit2.Text)) /24);
Edit3.Text := DateTimeToStr((StrToDateTi
Chalo,
Did you tried out your proposed answer?
I see you are new to EE. Proposing an answer is generally not considered a good practice here. But if you propose it anyway, you should be sure it works, and it's a different one than other poster suggested. In this case, neither is true.
In the future, please consider posting a comment and let the asker choose the right answer for himself.
Did you tried out your proposed answer?
I see you are new to EE. Proposing an answer is generally not considered a good practice here. But if you propose it anyway, you should be sure it works, and it's a different one than other poster suggested. In this case, neither is true.
In the future, please consider posting a comment and let the asker choose the right answer for himself.
only a b-grade for a perfect work ?
:-(
:-(
:-) ...
there are also DaysBetween, SecondsBetween, ... check out the DateUtils unit :)