日期修改
请大家帮忙,例如今天是20140119,现在自动显示当前日期,我想当前日期自动显示为前一个月的25号自动显示为20131225。PROCEDURE rqtext.Valid
IF EMPTY(THISFORM.RQTEXT.VALUE)
IF LASTKEY() = 5 .OR. LASTKEY() = 19
RETURN -1
ELSE
RETURN 0
ENDIF
ENDIF
IF LASTKEY() = 9 AND .NOT. MDOWN()
JZRQ = JZRQ - 1
THISFORM.RQTEXT.REFRESH
RETURN 0
ELSE
IF LASTKEY() = 148 AND .NOT. MDOWN()
JZRQ = JZRQ + 1
THISFORM.RQTEXT.REFRESH
RETURN 0
ELSE
IF ABS(JZRQ - DATE()) >= 10
?? CHR(7)
IF ABS(JZRQ - DATE()) > 365
WAIT WINDOW '日期有错!请检查。'
RETURN 0
ELSE
WAIT WINDOW '日期是否有错,请检查。'
IF LASTKEY() <> 13
RETURN 0
ENDIF
ENDIF
ELSE
IF LASTKEY() <> 13 AND .NOT. MDOWN()
IF LASTKEY() = 5 .OR. LASTKEY() = 19
RETURN -1
ELSE
RETURN 0
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
THISFORM.JZBUTTON.VISIBLE = .T.
ENDPROC