如题,我设置了yyyy-MM-dd HH:mm:ss:fff,显示的结果是2009-11-11 14:26:fff,请问如何才能精确到毫秒,在线等,立马结贴!

解决方案 »

  1.   

     this.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff");
      

  2.   

    AFAIK the answer is no.  The supported formats are described in the MSDN docmentation for the CustomFormat property.  You can't use it for anything more precise than a second.This control wraps the native Windows DateTimePicker control implemented in ComCtl32.dll and only supports format strings supported by that control - the .NET "f" specifier for fractions of a second is not supported. 
    来自:
    http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/9c3f9006-dae7-47d8-b736-b0f076995adf
      

  3.   

    要赋值给dateTimePicker才行,这个赋值报错!
      

  4.   

    DateTime time = dateTimePicker1.Value;
                string xx = time.ToString("MM/dd/yyyy hh:mm:ss.fff");
    这样可以显示的了
      

  5.   

    或者Winform里面有没有什么控件或者方法能实现如下格式:
    --:--:--:--:--:--:---:
      

  6.   

    直接在dataTimePicker里面应该显示不出来
      

  7.   

    看错了  最后放一个NumericUpDown把