CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: help

  1. #1
    Join Date
    Sep 2010
    Posts
    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..

  2. #2
    Join Date
    Jun 2001
    Location
    Melbourne/Aus (C# .Net 4.0)
    Posts
    686

    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
  •  





Click Here to Expand Forum to Full Width

Featured