smart date

smart date

Old forum URL: forums.lhotka.net/forums/t/3601.aspx


jhw posted on Wednesday, September 26, 2007

I am setting the properties for a smartdate so that an empty string will be returned if the smartdate is empty. This date is set to maxdate is empty.

If I load a new object, smartdate.isEmpty works fine as it returns true, as it should. But if I load an object from the database, isEmpty always returns false. I manually check the date and it is a maxdate, and the emptyIsMin is still false.

Even though the new and old objects both have max dates 12/31/9999 11:59:59 PM, the isEmpty values are not the same. Is there something I do wrong when I load the objects. I do it exactly as Rocky does in the project example.

Thanks

Heath

david.wendelken replied on Wednesday, September 26, 2007

Check your SmartDate constructors and properties.  There is an optional parameter/property that can be set to control whether an empty date is treated as "high" or "low".  Your property (private variable) and your database load routine do not agree on its value.

Copyright (c) Marimer LLC