Padding Padding
Janet
Systems
 Register  Login 
Telephone  01628 566 178
Website Design, Hosting and Software Services
  Search 
Padding
corner Padding corner
Padding Padding
corner Padding corner
 ASP.NET Articles

In classic ASP we had now() which would return the current date and time. For asp.net this no longer exists.  So what should we use?

Lets assign the current date to the variable taxDate

taxDate.Text = DateTime.Now

We can improve on this by adding some formatting.  In this instance we are only interested in the date, and not the time.  So we have:

taxDate.Text = DateTime.Now.ToString("dd, MMM, yyyy")


This article viewed: 2065 times Back

Copyright © 2004-2007 Janet Systems Ltd.

 Print   

DotNetNuke Website design and hosting from £15.00 per month. More...

Looking for a website design company in the Thames Valley, call us on 01628 566178

DotNetNuke Modules
DotNetNuke Modules availalble from Janet Systems

DotNetNuke Skins
DotNetNukeSkins.gif

from Janet Systems

Padding
Copyright 2002-2008 Janet Systems Ltd.   Terms Of Use  Privacy Statement Tuesday, May 13, 2008