label.captiong:=formatedatetime('yyyy-mm-dd',date);

解决方案 »

  1.   

    sorry多写了个'e'
    label.captiong:=formatdatetime('yyyy-mm-dd',date);
      

  2.   

    再告诉你一种方法
    DateTimeToStrimg(label.Caption,'yyyy-mm-dd',Date);
      

  3.   

    DateToStr(Date) 可以把当前日期转化为字符型.同理还有:TimeToStr(Time) 等...
      

  4.   

    不好意思,写错了,是 DateTimeToString
      

  5.   

    yourlabel.caption:=DateTimeToString(datetime)
      

  6.   

    yourlabel.caption:=DateToStr(Date);
    yourlabel.caption:=DateTimeToString(date)
      

  7.   

    label.caption :=DateTimeToString(date);
      

  8.   

    DateToStr():把日期型转换为字串。
    Date:为取当前日期
    所以:label.caption:=DateToStr(Date);这么详细,多点分撒!
      

  9.   

    label.captiong:=formatdatetime('yyyy-mm-dd',date);