Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

So I'm writing a program which requires a date to be input. DateTimePicker is fine for this but the program also requires a day to be input. Is there a way to auto-fill a textbox with the day corresponding to the date selected rather than the infinate

 

if datetimepicker1.text = 15/04/2005 then textbox1.text = Friday

if datetimepicker1.text = 16/04/2005 then textbox1.text = Saturday

 

you get my point!

 

Thanks guys,

 

Tom

Posted
Is there a way to auto-fill a textbox with the day corresponding to the date selected rather than the infinate

 

textbox1.text=datetimepicker1.value.tostring("dddd")

 

Should see you right.

Afraits

"The avalanche has started, it is too late for the pebbles to vote"

Posted (edited)

Thought I'd make my post hard to read too. :p

 

Use DateTime.DayOfWeek

 

Edit: Ya, the ToString method might be easier in your case.

Edited by IngisKahn
"Who is John Galt?"

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...