Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Printing and Using Time in Milliseconds

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Printing and Using Time in Milliseconds

    I can print and use Time[0] which gives me Date, HH:MM:SS or it seems I can use
    Time[0].Millisecond which gives me just the number of Milliseconds.

    Rather than doing a Print ( Time[0].ToString() + Time[0].Millisecond.ToString() );

    How do I access Print or otherwise the Date, HH:MM:SS and Milliseconds in One shot.

    Thanks

    #2
    See https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx

    For example
    Code:
    string timestamp = Time[0].ToString("yyyy-MM-dd HH:mm:ss.fff");
    If you do it a lot, then build a simple routine to call.

    Comment


      #3
      aslane, That was exactly what I was looking for.

      thanks

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by PaulMohn, Today, 03:49 AM
      0 responses
      3 views
      0 likes
      Last Post PaulMohn  
      Started by inanazsocial, Today, 01:15 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Jason  
      Started by rocketman7, Today, 02:12 AM
      0 responses
      10 views
      0 likes
      Last Post rocketman7  
      Started by dustydbayer, Today, 01:59 AM
      0 responses
      2 views
      0 likes
      Last Post dustydbayer  
      Started by trilliantrader, 04-18-2024, 08:16 AM
      5 responses
      23 views
      0 likes
      Last Post trilliantrader  
      Working...
      X