473,405 Members | 2,354 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,405 software developers and data experts.

System date/time

Hi

How can I get the system date and system time (separately)?

I have tried now() but it returns both date/time.

Thanks

Regards
Nov 20 '05 #1
3 1654
Have you tried now.ToShortDateString and now.ToShortTimeString
"John" <jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi

How can I get the system date and system time (separately)?

I have tried now() but it returns both date/time.

Thanks

Regards

Nov 20 '05 #2
* "John" <jo**@nospam.infovis.co.uk> scripsit:
How can I get the system date and system time (separately)?

I have tried now() but it returns both date/time.


\\\
MsgBox(DateTime.Now.ToShortDateString())
MsgBox(DateTime.Now.ToShortTimeString())
///

.... assuming that you want to convert both to a string representation.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
"John" <jo**@nospam.infovis.co.uk> schrieb

How can I get the system date and system time (separately)?

I have tried now() but it returns both date/time.


Yes, now returns both. It returns a DateTime object, and you can use
it's Date and TimeOfDay properties.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4

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

Similar topics

3
by: awong | last post by:
Hi there, I was trying to convert the following VB6 code to VB.NET. But I can't find a corresponding System.XML object for MSXML IXMLDOMSelection. I am thinking to use System.XML XMLNodeList...
14
by: Jon Davis | last post by:
I have put my users through so much crap with this bug it is an absolute shame. I have a product that reads/writes RSS 2.0 documents, among other things. The RSS 2.0 spec mandates an en-US style...
2
by: Ben | last post by:
I have several pages written in aspx, but sometime the aspx page return the following error. And it hapeen, the whole web application gives this error, that means all the aspx files get affected....
4
by: Liverpool fan | last post by:
I have a windows application written using VB .NET that encompasses a countdown timer modal dialog. The timer is a System.Timers.Timer with an interval of 1 second. AutoReset is not set so accepts...
11
by: Mike9900 | last post by:
How can I get the real system date/time if the user fakes the date, for example by setting the system date back. -- Mike
1
by: pauline_redrainbow | last post by:
I am using Access 2003 to create an appointments system which holds appointments at 15 minute intervals, i.e 09:00, 09:15 etc. The system has two tables, one table has Times, and formatted to...
3
by: Carlos Lozano | last post by:
I have requirement to pause the system clock until a certain event (Win XP). Then the clock will be resumed to the real time. I think it can be done using core functions and/or redirecting the...
0
by: William LaMartin | last post by:
The results I get below are as expected except for the Date/Time information. This seems to be a bug in System.Net.WebRequestMethods.Ftp.ListDirectoryDetails. It is not allowing enough space for...
5
by: adie | last post by:
hi, can anyone help me out with this. the requirement is to display a time (any time) from a distinct timezone (lets say EST) on a webpage but to make available the conversion to the user local...
4
by: anagai | last post by:
I just want to check if a date entered in a textbox is equal to the current system date. I set the date object from the input field like this: dt1=new Date('10/01/2007'); the current system...
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?
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.