简单问题! 如何获得当前的年,月,日(分别获得)并将所获的年数保留后两位,即2003保留为03 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 decodedate(date,year,month,day);yearstr:=strtoint(copy(inttostr(year),2,3)); yearof(now)monthof(now)dayof(now) decodedate(date,year,month,day);yearstr:=strtoint(copy(inttostr(year),2,3)); yearof(now)monthof(now)dayof(now) 我记得是有那个函数的.不过我忘了.一个笨办法.strDate:=formatdatetime('yymmdd',now);然后用字符串堆取函数copy(strDate,1,2) 年copy(strDate,3,2) 月copy(strDate,5,2) 日 yearof(now)monthof(now)dayof(now) uses DateUtils年自己在取一次copy(inttostr(yearof(now)),3,2); TStringList 文本操作问题 急,大家来帮忙! 如何建lookup字段 delphi下访问加密的Access数据库的问题 为什么TForm无法接受到WM_KEYDOWN消息 <<<<这是怎么回事???给不了分! 送分题!如何修改dbgrid上标题行上的字体? 如果这里没人能解答我的问题,我只能够放到”大富翁“论坛试一试了。 100分的问题(关于多线程数据库应用程序) delphi xe 移动开发有么有前途? 一个Idhttp的问题 一个奇怪的问题?
yearstr:=strtoint(copy(inttostr(year),2,3));
monthof(now)
dayof(now)
yearstr:=strtoint(copy(inttostr(year),2,3));
monthof(now)
dayof(now)
一个笨办法.
strDate:=formatdatetime('yymmdd',now);
然后用字符串堆取函数
copy(strDate,1,2) 年
copy(strDate,3,2) 月
copy(strDate,5,2) 日
monthof(now)
dayof(now)
年自己在取一次
copy(inttostr(yearof(now)),3,2);