I have a code segment that looks like this:
private void Enter_Click(object sender, EventArgs e)
{
string name;
string date;
string answer;
name = nameInput.Text;
date = dateInput.Text;
answer = "NO";
outputLabel.Text = name + "'s birthday is " + date;
answerBox.Text = answer;
}
}
}
The bolded and underlined part is what needs changing. The code is just a crappy little program in which you input your name and your birthday, and it says wether or not that day is today, and it then displays YES or NO in monolithic letters. So far I've got it so it always changes to no, but how do I get it so that I can input a date into a text field, push the enter button then have it check the current date with the date entered in order to get it to output an answer into a string so I can make the monolithic letters appear? (C#, probably could have guessed that but there you go.)
Outputting date in months and days only into a string
Started by Aspiring Coder, Sep 13 2011 08:52 AM
1 reply to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









