formatdatetime('hh:nn',hr_min);和formatdatetime('hh:mm',hr_min);

解决方案 »

  1.   

    没任何区别
    mm Displays the month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.
      

  2.   

    mm Displays the month as a number with a leading zero (01-12). If the mm specifier 
    hh Displays the hour with a leading zero (00-23).
    nn Displays the minute with a leading zero (00-59).
      

  3.   

    delphi - helpDelphi Object and Component Reference
    Date-Time Format Strings
      

  4.   

    没有区别,yyyy mm dd hh mm/nn ss
    如果硬要说区别的话,就是为了怕表示月的mm和表示分的mm混淆而想出的缓解办法
    如果你把mm或者nn换成dd的话你会发现发现小时后面跟的是当天的日期

    showmessage(formatdatetime('yyyy-mm-dd hh:nn:ss',now))

    showmessage(formatdatetime('yyyy-mm-dd hh:mm:ss',now))
    显示的结果是一样的