Delphy下怎样得到当前时间,并把当前时间转化为字符串形式。

解决方案 »

  1.   

    mystring := datetostr(date());
      

  2.   

    date()只能得到日期不能得到时间,如果要同时得到日期和时间。该怎样得到。
      

  3.   

    formatdate(yyyy-mm-dd-hh等参数,date());
      

  4.   

    formatdatetime("yyyy-mm-dd hh:nn:ss", now) 按F1
      

  5.   

    label1.caption:=datetostr(date())+timetostr(time());
      

  6.   

    formatdatetime("yyyy-mm-dd hh:nn:ss", now)
    看看format函数用法.
      

  7.   

    formatdatetime("yyyy-mm-dd hh:nn:ss", now)
    看看format函数用法.
      

  8.   

    怎样把时间格式化成"yyyy-mm-dd hh:nn:ss"然后赋值给字符串。高手能给出源码吗?新手,急。
      

  9.   

    var 
        strCurTime:string;begin
    strCurTime:= timetostr(time());怎样把时间转化成“hh-nn-ss”格式。
      

  10.   

    怎样把转换成时间格式化成"yyyy-mm-dd hh:nn:ss"的字符串,重新转化成“yyyy-mm-dd hh-nn-ss”形式。高手能给出源码吗?新手,急。
    也就是怎样把字符串“hh:nn:ss”转化成“hh-nn-ss”
      

  11.   

    那就把FormatDateTime('yyyy-mm-dd hh-nn-ss',now)即可