Hi,

I want a field (may be string,date or number, no prob) to have a
format of YYYYMM (valid year and month) or if it is left null, to be
999999. How Could I accomplished that?

I have tried :
Field('A0514_DT_FIN','date',notnull=True, label= 'Dt Fim (YYYYMM)',
default= '999999')

and then the check:
db.tb0514_bihc_consultor_nivel.A0514_DT_FIN.requires =
IS_EMPTY_OR(IS_DATE(format=T('%Y%m'), error_message='formato deve ser
YYYYMM! ou vazio'))

It does not work as 99 is not a valid month and 9999 is not a valid
year.

Any ideas?

Reply via email to