tomos2 Posted April 15, 2005 Posted April 15, 2005 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 Quote
Afraits Posted April 15, 2005 Posted April 15, 2005 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. Quote Afraits "The avalanche has started, it is too late for the pebbles to vote"
IngisKahn Posted April 15, 2005 Posted April 15, 2005 (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 April 15, 2005 by IngisKahn Quote "Who is John Galt?"
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.