By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,916 Members | 1,728 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,916 IT Pros & Developers. It's quick & easy.

Todays Date

P: n/a
In VB6, I would have used Date()
That no longer works.

How do I find todays date in VB.net?
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
DateTime.Now

"Vayse" <Va***@nospam.nospam> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
In VB6, I would have used Date()
That no longer works.

How do I find todays date in VB.net?

Nov 21 '05 #2

P: n/a
Vayse,

In addition to Siva, just 'Now"

I hope this helps,

Cor
Nov 21 '05 #3

P: n/a
"Vayse" <Va***@nospam.nospam> schrieb:
In VB6, I would have used Date()
That no longer works.

How do I find todays date in VB.net?


'Now' or 'DateTime.Now' (= 'Date.Now'). To determine the date component of
the 'Date' returned by 'Now' you can use 'Date''s 'Date' property:

\\\
Dim d As Date = Now.Date
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4

P: n/a
Vayse,
In addition to the other Comments:

You can simply use DateTime.Today to get today's date with a zero for the
Time value.

--
Hope this helps
Jay
T.S. Bradley - http://www.tsbradley.net
"Vayse" <Va***@nospam.nospam> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
| In VB6, I would have used Date()
| That no longer works.
|
| How do I find todays date in VB.net?
|
|
Nov 21 '05 #5

P: n/a
Thanks guys.

"Jay B. Harlow [MVP - Outlook]" <Ja************@tsbradley.net> wrote in
message news:eQ**************@TK2MSFTNGP15.phx.gbl...
Vayse,
In addition to the other Comments:

You can simply use DateTime.Today to get today's date with a zero for the
Time value.

--
Hope this helps
Jay
T.S. Bradley - http://www.tsbradley.net
"Vayse" <Va***@nospam.nospam> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
| In VB6, I would have used Date()
| That no longer works.
|
| How do I find todays date in VB.net?
|
|

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.