Hi everyone
I'm new here, and is so often the case with forums, I discovered daniweb whilst googling for a solution!
I'm new to C#, and although I've read loads of books am finding that the best way of learning is to just get stuck in!
I've set myself the task of writing a fairly simple calculator to convert to and from unix time. I've managed the first part ok, and have a working app that converts to unix correctly. However I have come unstuck on the second part :(
I have a textbox input which I convert to integer and validate:
private void button2_Click(object sender, EventArgs e)
{
int anInteger;
anInteger = Convert.ToInt32(textBox1.Text);
int i = 0;
try
{
i = int.Parse(textBox1.Text);
}
catch (Exception)
{
MessageBox.Show("Please put only numbers");
}
however, I have now come to a grinding halt! The above compiles and works fine, but I've been messing for hours and can only manage to get errors beyond this point.
I'm sure I'll kick myself once I know the answer; basically I now need to convert my integer into dd/MM/yyyy HH:mm:ss format and display in textBox3.
Any help greatly appreciated, thank you
Peg