How to reset TDBDateTimePicker? lazarus / 16-Databases ---------------------------------------------------------------------- loaded · 2022-05-30 11:43 Hi All, In my current database, records with date type initially show as "00.00.0000". So far, no problem. However, after a change in the relevant record, it is not possible to revert the date to "00.00.0000". I can do this with SQL. But is it possible to reset it directly via TDBDateTimePicker? ---------------------------------------------------------------------- rvk · 2022-05-30 12:01 Quote from: loaded on May 30, 2022, 01:43:19 pmIn my current database, records with date type initially show as "00.00.0000". So far, no problem. However, after a change in the relevant record, it is not possible to revert the date to "00.00.0000". I can do this with SQL. But is it possible to reset it directly via TDBDateTimePicker? 00.00.0000 isn't a valid date, is it? Why are you not working with NULL for empty or unspecified dates in your database? It is possible to set a TextForNullDate. You could set it to 00.00.0000. But before writing it to the database you would need to change the NULL-value to 00.00.0000. ( or better yet, switch to null on screen and in the database ) O wait. That's TDBDateEdit. With TDBDateTimePicker you can't enter an invalid date, period. O, but you can set it to NULL. ---------------------------------------------------------------------- loaded · 2022-05-30 17:20 First of all, thank you very much for your reply Rvk. Quote from: rvk on May 30, 2022, 02:01:17 pm00.00.0000 isn't a valid date, is it? Yes, it is not a valid date. It just helps me perceive it visually faster. What I'm wondering is why TDBDateTimePicker can show the invalid date initially, but not the same value afterwards? Quote from: rvk on May 30, 2022, 02:01:17 pmWhy are you not working with NULL for empty or unspecified dates in your database? I think it would be better if I did as you said. Respects.