473,395 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

24 hours from current time

Tim
How can I tell if 24 hours has past from now?
Thanks!

Tim
Nov 20 '05 #1
6 1406
Now?

Now()?

Taht statement is never true... because after all.. Now is Now =)
"Tim" <Ti************@MajesticStar.com> wrote in message
news:08****************************@phx.gbl...
How can I tell if 24 hours has past from now?
Thanks!

Tim

Nov 20 '05 #2
* "Tim" <Ti************@MajesticStar.com> scripsit:
How can I tell if 24 hours has past from now?


It's christmas, I know, but are you sure you had a look at the members
of the 'DateTime' structure before posting your question?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Tim
For example:

KNOWNDATE = 12/22/2003 10:13:00 AM

How can I get the number of hours between Now() and
KNOWDATE

Tim
-----Original Message-----
* "Tim" <Ti************@MajesticStar.com> scripsit:
How can I tell if 24 hours has past from now?
It's christmas, I know, but are you sure you had a look

at the membersof the 'DateTime' structure before posting your question?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
.

Nov 20 '05 #4
Tim
For example:

KNOWNDATE = 12/22/2003 10:13:00 AM

How can I get the number of hours between Now() and
KNOWDATE

Tim

-----Original Message-----
Now?

Now()?

Taht statement is never true... because after all.. Now is Now =)

"Tim" <Ti************@MajesticStar.com> wrote in message
news:08****************************@phx.gbl...
How can I tell if 24 hours has past from now?
Thanks!

Tim

.

Nov 20 '05 #5
* "Tim" <Ti************@MajesticStar.com> scripsit:
For example:

KNOWNDATE = 12/22/2003 10:13:00 AM

How can I get the number of hours between Now() and
KNOWDATE


\\\
Dim KnownDate As Date = DateTime.Parse(...)
MsgBox(KnownDate.Subtract(DateTime.Now).Hours.ToSt ring())
///

As an alternative, you can use 'DateDiff'.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #6
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb
* "Tim" <Ti************@MajesticStar.com> scripsit:
For example:

KNOWNDATE = 12/22/2003 10:13:00 AM

How can I get the number of hours between Now() and
KNOWDATE


\\\
Dim KnownDate As Date = DateTime.Parse(...)
MsgBox(KnownDate.Subtract(DateTime.Now).Hours.ToSt ring())
///

As an alternative, you can use 'DateDiff'.


In addition:
Instead of the Hours member you, Tim, can use the TotalHours property.
--
Armin

Nov 20 '05 #7

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

Similar topics

8
by: Monty | last post by:
Let's say you provide an online service from 7:00AM to 6:00PM Eastern Time (daylight time in the summer). Is there way of showing these hours of availability on a web page in the user's local...
2
by: Steevo | last post by:
Is there a way of producing a script to automatically update and show: "Updated x hours and x minutes ago on xx/xx/xx" I currently have a script to automatically show the date and time the page...
6
by: Nige | last post by:
I've searched for days for an answer to this question; I hope someone can help. I want to make sure that my web content is reasonably current, but at the same time I don't want to bypass caching...
2
by: tdi1686 | last post by:
I want to make a table that lists the Seconds / Hours / Days since the user last visited my site, just like the myPHPnuke systems have, but I dont know the best way to go about it. At the moment...
4
by: Peter | last post by:
Hi I am using DateTime class and TimeOfDay.Hours attribute to return current time. It returns right value on two servers, but in one particular server it does not return right time. I checked that...
4
by: clintonG | last post by:
On an XP Pro machine with a current and synchronized system time GMT (-06:00) Central Time my use of the Visual Studio 2005 Website Administration Tool (WAT) is writing users into the SQL Server...
22
by: Drum2001 | last post by:
I have a table that tracks employee times. I have a column (Date/Time). Users, through a form, enter how long it takes them to complete a task. For example, 03:45 = 3 hours and 45 mins. I am...
1
by: crackerbox | last post by:
I have a table that I need 1st grouped by Parent_Doc_No and then by Flight_Date and I need the hours totaled each time it hits a new date and add up the hours in the database from this date for this...
12
by: remya1000 | last post by:
how can i select time (hours,minutes,second) in updown arrow buttons in VB.NET. as we have current time displayed in date and time properties in our system. in date and time properties, while...
6
by: richbneal | last post by:
I really like the site so far and this is my first post. I have looked through some of the archives with no luck. I have also read the posting guidelines and will do my best to be clear and accurate...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
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,...
0
jinu1996
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.