-
September 19th, 2010, 11:23 PM
#1
help
I'm trying to write my first C# application (based on Visual Studio) ... also using Windows Forms for input (from user) and output.
User puts numbers into six text boxes (e.g. 2009 20 02 02:49:35) and then when the 'Convert' button is clicked, the program outputs E1234FB3278DC0 in a different text box.
Not sure if this is relevant but E1234FB3278DC0 = 63370694975000000 (in decimal).
oh also, I'm not sure about convertedText.writeline... should it be this.textBox7 = microseconds; ?
Code:
String dateString = yyyy.Text + dd.Text + mm.Text + hh.Text + mm.Text + ss.Text;
DateTime timestamp = DateTime.ParseExact(dateString, "yyyy dd mm hh:mm:ss", CultureInfo.CurrentCulture);
long ticks = timestamp.Ticks;
long microseconds = ticks / 10;
convertedText.WriteLine(microseconds.ToString("X"));
thanks in advance..
-
September 21st, 2010, 01:49 AM
#2
Re: help
You haven't told us what your problem is?
Rob
-
Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|