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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subtract times

Status
Not open for further replies.

buzzt

Programmer
Oct 17, 2002
171
CA
I have what I thought would be a very simple question. I want to subtract a time in my database from the current time, and get a difference in minutes. What is the most concise and efficient way to do this?
 
You might fetch the time from the database and convert it to unix epoch time ticks using strototime(). Do the same for the current time.

Subtract the current time from the database time. Divide the remainder by 60.

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top