473,404 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Now() equivalent?

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
Nov 18 '05 #1
4 902
"Jerome" wrote:
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

- - -
Nov 18 '05 #2
The .NET Framework has a DateTime clas

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

Hope this help

Yatee

Nov 18 '05 #3
With no offence intended, System.DateTime is a structure, not a class.

http://msdn.microsoft.com/library/en...ClassTopic.asp

Greetings
Martin
"Yateen" <an*******@discussions.microsoft.com> wrote in message
news:DD**********************************@microsof t.com...
The .NET Framework has a DateTime class

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

Yateen


Nov 18 '05 #4
> 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.

"Yateen" <an*******@discussions.microsoft.com> wrote in message
news:DD**********************************@microsof t.com... The .NET Framework has a DateTime class

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

Yateen

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

43
by: Spare Change | last post by:
This is a recommendation to Microsoft. VB.net and c# are almost exactly equivalent. I know why Microsoft invented VB.net -- to wean old style VB6 scripters into a true OO world: .Net. But...
43
by: Spare Change | last post by:
This is a recommendation to Microsoft. VB.net and c# are almost exactly equivalent. I know why Microsoft invented VB.net -- to wean old style VB6 scripters into a true OO world: .Net. But...
14
by: grid | last post by:
Hi, I have a certain situation where a particular piece of code works on a particular compiler but fails on another proprietary compiler.It seems to have been fixed but I just want to confirm if...
9
by: Freddy Coal | last post by:
How convert a number for the string equivalent? For example: I have the number "16448", I would like take this number in a two bytes strings, the number represent the "@@". Thanks in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.