ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   making a timer (https://www.excelbanter.com/excel-programming/307622-making-timer.html)

animal1881[_5_]

making a timer
 
I made minesweeper using excel. Works pretty well. The only prolem i
I can't figure out how to subtract a starting time from an ending tim
grabbed using

with DateTime
.TimeValue(.Now)
end with

Does anyone know how to subtract times from each other? As in

DeltaTime = Time2-Time1

--
Message posted from http://www.ExcelForum.com


Chip Pearson

making a timer
 
You can simply subtract the start time from the end time. The
result will be a number that represents a fraction of a 24 hour
day. Multiply this by 60*60*24 to get the number of seconds.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"animal1881 " wrote
in message ...
I made minesweeper using excel. Works pretty well. The only

prolem is
I can't figure out how to subtract a starting time from an

ending time
grabbed using

with DateTime
TimeValue(.Now)
end with

Does anyone know how to subtract times from each other? As in

DeltaTime = Time2-Time1?


---
Message posted from http://www.ExcelForum.com/




david mcritchie

making a timer
 
or perhaps format as minutes and seconds
[m]:ss
instead of formatting in seconds

Many Date an Time questions would be answered in either of our
webpages.
http://www.mvps.org/dmcritchie/excel/datetime.htm more than just Excel
http://www.cpearson.com/excel/datetime.htm shorter

ExcelForum had made searching for web pages very difficult because
they put newsgroup postings onto web pages where they get indexed
again by Google (in addition to being indexed by Google Groups).
Unless Google stops indexing such pages as websites the problem will
continue to grow, and Google has their own answers.google.com so
that is not likely to happen. Newsgroups have lots of questions that
are asked and answered 100s of times; whereas, web pages written
on a topic tend to be better written and less redundant. If you could
eliminate the newsgroup type of postings you would see Chip's web page
near the top of a web search for -- excel difference in time

Just the same almost every answer posted has been posted before or
is based on previously posted questions and answers, or directly from
the Excel Help, or Microsoft KB. So while the answers may get better
with time, a lot of effort is wasted on duplication.

newsgroups searches.
http://www.mvps.org/dmcritchie/excel/xlnews.htm

HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm


"Chip Pearson" wrote ...
You can simply subtract the start time from the end time. The
result will be a number that represents a fraction of a 24 hour
day. Multiply this by 60*60*24 to get the number of seconds.



"animal1881 " wrote...
I made minesweeper using excel. Works pretty well. The only
problem is; I can't figure out how to subtract a starting time from an
ending time grabbed using

with DateTime
TimeValue(.Now)
end with

Does anyone know how to subtract times from each other? As in

DeltaTime = Time2-Time1?





All times are GMT +1. The time now is 06:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com