By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,499 Members | 1,210 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,499 IT Pros & Developers. It's quick & easy.

Visual Basic .NET Day(Now)

P: n/a
Hi all,

i need to display the day in a text box.

what is the code for getting

Day(Now)

to be displayed in

Textbox1.Text

I somehow cannot get it to work

Thanks in advance

Murt
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
you could try
format(now(),"dddd") if you want the full day
format(now(),"ddd") for a shorter version of the day
format(now(),"dd") for the day in nrs like 02
<Mu************@yahoo.DOTCom> wrote in message
news:09****************************@phx.gbl...
Hi all,

i need to display the day in a text box.

what is the code for getting

Day(Now)

to be displayed in

Textbox1.Text

I somehow cannot get it to work

Thanks in advance

Murt

Nov 20 '05 #2

P: n/a
<Mu************@yahoo.DOTCom> schrieb
i need to display the day in a text box.

what is the code for getting

Day(Now)

to be displayed in

Textbox1.Text

I somehow cannot get it to work


Do you mean the weekday or the day number? To get the day:

Textbox1.Text = Date.Now.Day.ToString

- or, shorter -

Textbox1.Text = Date.Today.ToString
Have also a look at the other members of the Date/DateTime data type.
--
Armin

Nov 20 '05 #3

P: n/a
many thanks,

is there a resource where one can see the differant
formats particularly for date, time, year etc.?

thanks

Murt

-----Original Message-----
you could try
format(now(),"dddd") if you want the full day
format(now(),"ddd") for a shorter version of the day
format(now(),"dd") for the day in nrs like 02
<Mu************@yahoo.DOTCom> wrote in message
news:09****************************@phx.gbl...
Hi all,

i need to display the day in a text box.

what is the code for getting

Day(Now)

to be displayed in

Textbox1.Text

I somehow cannot get it to work

Thanks in advance

Murt

.

Nov 20 '05 #4

P: n/a
"Murt" <mu**@nospam.com> schrieb

is there a resource where one can see the differant
formats particularly for date, time, year etc.?


Concerning the Format function EricJ mentioned, have a look at the function
documentation.

See also:
http://msdn.microsoft.com/library/en...hbasetypes.asp
especially
http://msdn.microsoft.com/library/en...matstrings.asp
--
Armin

http://learn.to/quote
http://www.plig.net/nnq/nquote.html

Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.