如何使字段时间格式化为(如:2005-7-1输出)....本人使用的是fastreport 3.0
字段内容为05 18 2005  9:52AM形式

解决方案 »

  1.   

    ---------------------------
    Debugger Exception Notification
    ---------------------------
    Project Project1.exe raised exception class EVariantTypeCastError with message 'Could not convert variant of type (String) into type (Double)'. Process stopped. Use Step or Run to continue.
    ---------------------------
    OK   Help   
    ---------------------------
      

  2.   

    var
     year,month,day:word;
    begin
     decodedate(now,year,month,day);
     inttostr(year)+'-'+inttostr(month)+'-'+inttostr(day);
    end;
      

  3.   

    select left(convert(nvarchar,cast(a as datetime),21),10) from 表名 
    a as datetime 中'a'为你的字段名
      

  4.   

    to :mornlena(MoRn) 
    你简直是太牛了,送分给你