W windflower Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-10 #1 我用Stryear:=copy(datetostr(date()),1,2) 来取出年份怎么会得到"5/"呢?
T terry_lzs Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-10 #2 这有什么好奇怪的,你的时间设置成了dd/mm/yy形了嘛 打开你的控制面板的时间类型设置看看是不是这样 设置成yy/mm/dd不就行了?!
Y yanzi_wy Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-10 #3 不想改的话就写成Stryear:=copy(datetostr(date()),7,2)
J JohnsonGuo Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-10 #4 Copy(FormatDateTime('yyyy/mm/dd', Date), 1, 4)
F fbyang Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-10 #5 应该是你的时间格式不对,你可以先SHOWMESSAGE(DATETOSTR(DATE())),看看就明白了。
G gcq Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-11 #7 JohnsonGuo的方法对的! Stryear:=Copy(FormatDateTime('yy-mm-dd', Date()), 1, 2);