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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hourly Avg



 
 
Thread Tools Display Modes
  #11  
Old March 19th, 2010, 08:15 PM posted to microsoft.public.access
James A. Fortune
external usenet poster
 
Posts: 903
Default Hourly Avg

On Mar 17, 8:12*pm, "KenSheridan via AccessMonster.com" u51882@uwe
wrote:
The following function would round a date/time value down to the nearest hour:

Public Function RoundToHour(dtmDateTime As Date) As Date

* * RoundToHour = CDate(Format(dtmDateTime, "yyyy-mm-dd hh:00:00"))

End Function

Ken Sheridan
Stafford, England


That's a very nice, elegant function!

James A. Fortune

  #12  
Old March 19th, 2010, 08:58 PM posted to microsoft.public.access
KenSheridan via AccessMonster.com
external usenet poster
 
Posts: 1,610
Default Hourly Avg

Kind of you to say so, James.

Ken Sheridan,
Stafford, England

James A. Fortune wrote:
On Mar 17, 8:12 pm, "KenSheridan via AccessMonster.com" u51882@uwe
wrote:
The following function would round a date/time value down to the nearest hour:

[quoted text clipped - 6 lines]
Ken Sheridan
Stafford, England


That's a very nice, elegant function!

James A. Fortune


--
Message posted via http://www.accessmonster.com

 




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 10:16 AM.


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