473,396 Members | 1,916 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,396 software developers and data experts.

Number of seconds within current day

Hi,

is there a variable in VB.NET that return the actual number of seconds
(or milliseconds) in the current day? Something like the variable Timer
in VB6?

I can calculate it, but I wanted to be sure if this var exist.

Thank you

Marty
Nov 21 '05 #1
2 1459
Marty.
I would recommend the TimeSpan.TotalSeconds property.

You can use DateTime.TimeOfDay to get the time of a DateTime as a TimeSpan.

Something like:

Dim secondsOfDay As Double = DateTime.Now.TimeOfDay.TotalSeconds

Hope this helps
Jay

"Marty" <xm******@hotmail.com> wrote in message
news:G97Qd.47114$gA4.45215@edtnps89...
Hi,

is there a variable in VB.NET that return the actual number of seconds (or
milliseconds) in the current day? Something like the variable Timer in
VB6?

I can calculate it, but I wanted to be sure if this var exist.

Thank you

Marty

Nov 21 '05 #2
Hi Jay,

yes, this is what I need.

Thanks you :)

Marty

Jay B. Harlow [MVP - Outlook] wrote:
Marty.
I would recommend the TimeSpan.TotalSeconds property.

You can use DateTime.TimeOfDay to get the time of a DateTime as a TimeSpan.

Something like:

Dim secondsOfDay As Double = DateTime.Now.TimeOfDay.TotalSeconds

Hope this helps
Jay

"Marty" <xm******@hotmail.com> wrote in message
news:G97Qd.47114$gA4.45215@edtnps89...
Hi,

is there a variable in VB.NET that return the actual number of seconds (or
milliseconds) in the current day? Something like the variable Timer in
VB6?

I can calculate it, but I wanted to be sure if this var exist.

Thank you

Marty


Nov 21 '05 #3

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

Similar topics

36
by: Dag | last post by:
Is there a python module that includes functions for working with prime numbers? I mainly need A function that returns the Nth prime number and that returns how many prime numbers are less than N,...
2
by: and | last post by:
hi everyone, i am using oracle 9.2.0 and i have written a simple jdbc java program to insert a record within a for loop to a table using jdbc thin driver(refer to the bottom of this email for the...
8
by: el_roachmeister | last post by:
I am looking for a script that can report the number of days since 2000. It should handle leap years but I am not worried about accuracy to the hour/minute or seconds. I am writing a calendar...
4
by: cyril | last post by:
I saw that is a recurrent message but i couln't succed in founding the solution ... I'm developping under Linux Does anyone have a code snippet that permit to get in a simple long var the...
5
by: David Requena | last post by:
Hi All, I'm trying to parse a file which has some timestamps embedded. These're expressed as a number of seconds elapsed since 01/01/1904 (macintosh time). I know OS X provides some APIs to...
6
by: Jason Bell | last post by:
How can I find out how many references to an instance exist at any given time? I want to make it so that when the number of references is one, a countdown starts (that one reference being the...
37
by: Gregc. | last post by:
G'day I'm trying to work out the number of years since 1970, here is my code: include <stdio.h> #include <time.h> const int SEC_IN_MIN = 60; const int SEC_IN_HOUR = SEC_IN_MIN * 60;
2
by: Paul Furman | last post by:
I don't know, maybe this isn't strange but someone else set up the shopping card coding I'm working with, the way it works is to get the time() in seconds like 1172693735 and that's the shopper_ID...
10
by: Matthias | last post by:
Dear newsgroup. I want to write a template function which accepts either integer or floating point numbers. If a certain result is not a whole number and if the template parameter is an...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.