Now() equivalent?

  • Thread starter Thread starter Jerome
  • Start date Start date
J

Jerome

Hi,

What's the asp.net equivalent to asp's Now()?
I've got a form field where I want to display todays date as default value.

Thanks,

Jerome
 
Jerome said:
What's the asp.net equivalent to asp's Now()?
I've got a form field where I want to display todays date as default
value.

txtDate.Text = DateTime.Today.ToShortDateString();

Steven

- - -
 
The .NET Framework has a DateTime clas

you can get the current time
with the DateTime.Now.ToString()

Hope this help

Yatee
 
you can get the current time
with the DateTime.Now.ToString().

Actually, that returns a string, not a DateTime value. Leave off the
..ToString() part and you're there.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Back
Top