Unofficial Content
  • This documentation is valid for:

will automatically generate error rules for all date and datetime attributes accepted in transactions to avoid entering dates values out of the supported range.


GeneXus automatically generates an error ("Field XXX out of range") when the user enters a value that is lower than the minimum date supported for all date and datetime attributes accepted in a transaction. XXX is the corresponding attribute's description.

The minimum date supported is the null value defined in GeneXus for dates. It depends on the DBMS selected for the DataStore corresponding to the base table of the transaction.
Those values are:

SQL Server 1753/01/01
SQL Server CE1753/01/01
MySQL 1000/01/01
Access 100/01/01

The rule is triggered as any rule you may have written. However, it does not appear in the object Rules section but can be seen in the Detailed Navigation Report. This rule is additive, meaning that it does not overwride any rule you may have on the same attribute.

Advanced considerations

You can change the default text used by GeneXus when the attribute validation fails. To do this, change the text corresponding to the code GXSPC_OutOfRange in the Language object .
As we mention above, the default text is "Field %1 is out of range"


In a logfile transaction, you have:

In the corresponding detailed navigation report you will see the rule
Error( "Field Log File Date is out of range" , OutOfRange) with different triggering conditions depending on the DBMS Model Property.

SQL Server ...IF NOT (CliFchIng.isempty() or CliFchIng >= ymdtod( 1753 , 01 , 01]]
SQL Server CE...IF NOT (CliFchIng.isempty() or CliFchIng >= ymdtod( 1753 , 01 , 01))
MySQL ...IF NOT (CliFchIng.isempty() or CliFchIng >= ymdtod( 1753 , 01 , 01))
Access ...IF NOT (CliFchIng.isempty() or CliFchIng >= ymdtod( 100 , 01 , 01))

This feature was introduced in GeneXus 9.0. If your application was written with previous versions you may already have date range validation rules that may be platform dependent. You may consider removing your rules as they are no longer required but it is not mandatory.
Comments & Collaboration

Last update: November 2023 | © GeneXus. All rights reserved. GeneXus Powered by Globant