Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add a number of minutes to a time

Status
Not open for further replies.

BRADENSTOKE

Programmer
Jan 2, 2003
24
GB
I have a time in string format ie '09:45'
I want to convert this to a new time + n minutes
ie: time+190 minutes.
I can EncodeTime(09, 45, 0, 0);
but how do I add 190 or any number of minutes after this ?
Frank.


Frank.
 
hi

I'd do it like this:

1 = a day, so I'd divide this down and multiply by your factor:-

var OneMin : real;
:
OneMin := 1/24/60;
newtime := currenttime + (OneMin * 190);

lou

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top