473,467 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Todays Date

In VB6, I would have used Date()
That no longer works.

How do I find todays date in VB.net?
Nov 21 '05 #1
5 11969
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
Vayse,

In addition to Siva, just 'Now"

I hope this helps,

Cor
Nov 21 '05 #3
"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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Gerry Viator | last post by:
Hi all, I have a textbox were a time is typed in like: upto 4 numbers 1900 300 1000 1425 I would like as they type the text to show todays date plus the time they
1
by: garyusenet | last post by:
Using VB Express and SQL. I have an sql database. what function gives me todays date and time? and do i enter it in the 'default' property for the column in the database? i've tried now()...
2
by: Chuck | last post by:
Using a macro to output a query to an Excel file. Is there a way to automatically add todays date in the file spec? As: C:\Access Data\ & todays date.xls Chuck ....
2
by: Drum2001 | last post by:
Hello, I am having isues with the following: I have two forms, a MAIN FORM with a SUB FORM: Within the MAIN FORM, I have an unbound textbox (Date Format) and a command button. Onload, the...
1
by: Mark12345 | last post by:
Hi all before I begin to tell you my problems just a big thanks to Mary McCarthy who helped me lots. Thank You Mary!!! Right todays problems are Getting the date in my form automatically. (read...
2
by: Luqman | last post by:
Hi, Any Idea how to Display Todays Date in DetailView Template Field while Inserting ? For example: When I click on New Button of DetailView Control, I need to display Today's Date in a...
8
by: Trev | last post by:
Hi Can anyone point me in the right direction here, I would like to open a table in access 2003 by date. I have an asp web page which needs to read data from a table with each days today's date...
3
by: jonosborne | last post by:
Hi guys, im a bit of a novice being thrown in at the deep end ! Using MS Access 97 i have a table with data that is updated once a day from an Excel spreadsheet. I need a way of identifying when data...
1
by: phpmel | last post by:
Hi guys, I have an asp calendar control, text box, calendar icon, eraser icon all within an update panel. The calendar works fine, postbacks are handled without the flickering of the screen etc....
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
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...
1
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
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,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.