date field leads to error

FRW

Well-known member
If I use a date-field that might have an entry, but is not required, so it leads to an error, if there isn't any date in this field.
Within DBMS the corresponding field is "date" with default NULL
Error says: "Invalid datetime format: 1292 Incorrect date value"

About:
You are using DaDaBIK version 8.3-Lerici enterprise, installed on 04-25-2018

PHP Version: 7.0.7
mysql version: 5.5.5-10.0.34-MariaDB
Web server: Apache 2.4

Client: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.119 Safari/537.36
 

eugenio

Administrator
Staff member
Hello,
I am not sure if I have well understood your question; if you want to insert in the DB a NULL value when the user left a field blank, you have to set $treat_blank_as_null = 1 in config.php

Best,
 
Top