GoMonth()
, que sirve para meses. ? GoDay(DATETIME(),365) ? GoDay(DATE(),28) ? GoDay(DATETIME(),-31) FUNCTION GoDay(tuDate,tnDays) LOCAL luRet IF VARTYPE(tnDays) # "N" tnDays = 0 ENDIF DO CASE CASE VARTYPE(tuDate) = "D" luRet = tuDate + tnDays CASE VARTYPE(tuDate) = "T" luRet = tuDate + tnDays * 60 * 60 * 24 CASE NOT VARTYPE(tuDate) $ "TD" *-- Error luRet = NULL ENDCASE RETURN luRet ENDFUNC
No hay comentarios:
Publicar un comentario