Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateTime.Now vs Now()

Status
Not open for further replies.

Auguy

Programmer
May 1, 2004
1,206
US
I know this is very basic, but is there any difference in the values returned by DateTime.Now and Now()? I think they are exactly the same, but just thought I would ask to make sure. Is one preferred over the other? Just trying to be consistent in my code.

Auguy
Northwest Ohio
 
I'm not sure but by Now(), do you mean Microsoft.VisualBasic.Now()? I try to stick with the regular .Net libraries over the VisualBasic namespace when possible.
 
Thanks RiverGuy. Yes that is what I meant by Now(). I will follow your advice and convert to DateTime. Fortunately I don't have many change to make because I am now getting the current DateTime from SQL on the server to avoid users playing with the calendar on their local machines.

Auguy
Northwest Ohio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top