473,403 Members | 2,183 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,403 software developers and data experts.

Visual Basic .NET Day(Now)

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
4 1952
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
<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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: ReidarT | last post by:
I want to fill a html control (id) = lblDayHtml with todays day now = new Date(); date = now.getDate(); day = now.getDay(); document.Form1.lblDayHtml.value = day(); I get the message:...
9
by: Valerie | last post by:
In order to compare a letter entered by a user with its place in the alphabet, am I supposed to find the its index in the alphabet list?
14
by: | last post by:
I cannot for the life of me get remove debugging to work. I continue to receive "Error while trying to run project: Unable to start debugging on the web server. Access is denied. Verify that you...
5
by: Jeff | last post by:
Hi All, I am fairly new to VB .Net 2003. I have been reading a book and doing some of the exercises. I was practicing with labels and it was explaing how to have info show in the label, so I...
97
by: Master Programmer | last post by:
An friend insider told me that VB is to be killled off within 18 months. I guess this makes sence now that C# is here. I believe it and am actualy surprised they ever even included it in VS 2003 in...
2
by: Fromethius | last post by:
I have been reading forums and googling for the entire day now, and still to no avail. I don't want any dlls in the folder with the exe, I don't want the .Net Framework to be required just to say...
2
by: =?Utf-8?B?QW5keQ==?= | last post by:
Hello, Today is Thursday. However Now.day and day(now) are retutning 6, which equates to DayOfWeek.Saturday. This is causing havoc here as the system currently thinks the offices are shut,...
0
by: bbking66 | last post by:
Hello all, I've experienced a problem that I hadn't seen never before on any XP machines. I had a computer where windows 2000 was installed, after a disk format (quick format within Windows XP...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.