473,902 Members | 4,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Time Range Calculation?

I'm trying to find out if now() is between 9:00 AM and 5:00 PM I've tried
a few things but can't get it to work.

Nov 21 '05
11 7999

Very nice (it seems that I forget this one forever while I have seen this
more times from you), I even wrote once that I would find it even nicer when
ISO times where used.

However, why static?

Nov 21 '05 #11
| However, why static?

Static workHours As New TimeRange(#8:00 :00 AM#, #5:00:00 PM#)

I defined workHours as Static, as I view it effectively as a Constant.

Depending on the usage I would consider making it Shared Readonly in the
enclosing type.
| I even wrote once that I would find it even nicer when
| ISO times where used.
Agree: I prefer SQL's (not SQL Server) Date, Time, TimeStamp, & Interval
types to be more flexible over .NET's DateTime & TimeSpan types. For example

I've considered creating a library that implements Date, Time, Timestamp, &
Interval, but todate have not. (With SQL Server 2005 & VB 2005 one could
define SQL Server & .NET friendly versions). Implementing them interms of
DateTime & TimeSpan might be "easiest".

Date = DateTime without any Time value
Time = DateTime without any Date value
Timestamp = DateTime
Interval = TimeSpan

Of course with VB's Date keyword meaning DateTime, it might make using Date
to mean a real date awkward...

Hope this helps

"Cor Ligthert" <no************ @planet.nl> wrote in message
news:es******** ******@TK2MSFTN GP10.phx.gbl...
| Jay,
| Very nice (it seems that I forget this one forever while I have seen this
| more times from you), I even wrote once that I would find it even nicer
| ISO times where used.
| However, why static?
| Cor
Nov 21 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: androtech | last post by:
Hello, I'm looking for a function that returns a date range for a specified week number of the year. I'm not able to find functions like this anywhere. Any pointers/help would be much appreciated. TIA
by: John Harrison | last post by:
I knew that unsigned integral data types were the cause of scads of mostly spurious warning messages, but I didn't realise that they were a security risk too (see here http://www.securitytracker.com/alerts/2004/Feb/1009067.html). All for one measly extra bit. So has the time come for C++ to deprecate unsigned integral types? john
by: John Feeley | last post by:
am tring to add a number of years to a dob. im doing this by adding my date+years*365.26 I get a string of numbers. I then convert the number in the next column to actual date again. I'm getting the correct date. Now I want my criteria on that column to allow me to return only date in a given to from period of my choosing. I try the between_and functions but nothing is returned. I'm guessing it's because the column is still a calculation...
by: Jerry | last post by:
I am rewriting my vba routines to C# to increase speed. I have been unable to find any help on how to pass ranges to C#. Excel function that was called in VBA =CalcRows(A1,A2,B1:B140,C1:C140,D1:D140) A1 holds the type of calculation to perform A2 holds the number of rows to calculate B1:B140 column used in calculations (Dependent on what A1 has) C1:C140 column used in calculations (Dependent on what A1 has)
by: falcon | last post by:
Is there a way I can do time series calculation, such as a moving average in list comprehension syntax? I'm new to python but it looks like list comprehension's 'head' can only work at a value at a time. I also tried using the reduce function and passed in my list and another function which calculates a moving average outside the list comp. ... but I'm not clear how to do it. Any ideas? Thanks.
by: ram.ragu | last post by:
hi i have problem to calculate idle time of cpu and if idle time is more then i have to shut down the system. can anyone tell me the idea to so that please
by: Generic Usenet Account | last post by:
A lot of research has been done to prove that the contention that C code is more efficient and more compact than equivalent C++ code is a myth. My posting pertains to a slightly different aspect of this debate. Here are my two questions: 1) Does anyone have any information on comparison of C and C++ software written for the ARM processor? 2) Are there any compiler and CPU dependencies that have to be factored in while debating this...
by: Lara1 | last post by:
I'm trying to get certain cells to show a hovering alert message when I click on them. (I don't want an error-message style box to pop up, because I'll eventually want it to show for lots of cells at once.) I recorded a macro to get the code, which I tweaked minimally, and pasted into a clean spreadsheet to test it. It seems to work beautifully. However, when I try to apply the same code within a larger programme, in a working spreadsheet,...
by: CoreyReynolds | last post by:
Hey all, Here's the culprit: Sub PopulateRange(Cell_Range As Range) Dim v Dim i As Long Dim j As Long Application.ScreenUpdating = False
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.