Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dharav's avatar

invalid date format

i am trying to add dates in table it give following error Invalid datetime format: 1292 Incorrect date value: '09/15/2016' for column 'from' at row 1

this is schma of my table

      Schema::create('rents', function (Blueprint $table) {
              $table->increments('id');
              $table->date('from');
              $table->date('till');
              $table->float('totalPrice');
              $table->string('note');
              $table->integer('product_id');
              $table->integer('users_id');
              $table->rememberToken();
              $table->timestamps();
              });   
0 likes
2 replies
primordial's avatar
Level 7

you need to use the format YYYY-MM-DD

Please or to participate in this conversation.