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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      41 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      27 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      45 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      37 views
      0 likes
      Last Post CarlTrading  
      Working...
      X