我写了可是输入{^1986-11-14}时,最后的结果是一九八六年月日
有点问题,不知道哪里错了,哦,帮我看一下,谢了!
set talk off
clear
input "pls input a date :" to x
c1="一二三四五六七八九十"
q=space(0)
b1=year(x)
q1=space(0)
do while b1>0
h1=b1%10
p1=subs(c1,2*h1-1,2)
q1=p1+q1
b1=int(b1/10)
enddo
b2=month(x)
q2=space(0)8k
do while len(b2)=2
h2=b2%10
p2=subs(c1,2*h2-1,2)
q2=p2+q2
b2=int(b2/10)
else len(b2)=1
p2=subs(c1,2*b2-1,2)
q2=p2+q2
enddo
b3=day(x)
q3=space(0)
do while len(b3)=2
h3=b3%10
p3=subs(c1,2*h3-1,2)
q3=p3+q3
b3=int(b3/10)
else len(b3)=1
p3=subs(c1,2*b3-1,2)
q3=p3+q3
enddo
q=q1+"年"+q2+"月"+q3+"日"
?Q
set talk on