|
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")
|
|
|
|