#1
I create a new Module with trongate desktop ap an define a not required property of type DATE.
If i create a new record and don't select a date (because is not aplicable for this special record), nevertheless the date is stored in the database as 1970-01-01.
It should be NULL or I'm wrong?
How to handle this type of optional Dates?
#2
Hi horseman,
I had the very same issue when I first started using Trongate.
You are not wrong, it should be null, but because the submit method sends an empty string if a date is not set,
MySQL and mariadb sets a default value in the date field, which is what you are seeing as a Unix timestamp.
Have a look at this thread to see how it was resolved via DaFa's great suggestion.
https://trongate.io/help_bar/thread/8xrrqTzLRfcd

Cheers!
#3
Perfekt answer KeepCalm! Thump Up.
#4
Hi horseman, could you please close this thread and award points to KeepCalm. There might be other open threads of yours that may need closing too.

Cheers