A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Time function - elapsed hh:mm



 
 
Thread Tools Display Modes
  #1  
Old May 4th, 2004, 03:21 PM
Rolls
external usenet poster
 
Posts: n/a
Default Time function - elapsed hh:mm

Two fields on a report contain a date-time stamp recorded by =now(). How to
display the elapsed time in hh:mm format in a third control?


  #2  
Old May 4th, 2004, 03:38 PM
RobFMS
external usenet poster
 
Posts: n/a
Default Time function - elapsed hh:mm

This may be a good alternative for you:

Use High Resolution Timers
http://www.fmsinc.com/free/tips.html#TipsforVisualBasic

--
Rob

FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
"Rolls" wrote in message
...
Two fields on a report contain a date-time stamp recorded by =now(). How

to
display the elapsed time in hh:mm format in a third control?




  #3  
Old May 4th, 2004, 04:00 PM
John Vinson
external usenet poster
 
Posts: n/a
Default Time function - elapsed hh:mm

On Tue, 4 May 2004 09:21:35 -0500, "Rolls"
wrote:

Two fields on a report contain a date-time stamp recorded by =now(). How to
display the elapsed time in hh:mm format in a third control?


It depends somewhat on whether the time difference will ever exceed 24
hours. A robust way (that will display 192:30 for a week plus half an
hour):

DateDiff("h", [starttime], [endtime]) & ":" & Format(DateDiff("n",
[starttime], [endtime]) MOD 60, "00")

Note that it's "n" for miNutes - "m" is Months in both datediff and
Format expressions.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.