title: How to insert blank date/datettime or placeholder in MySQL without reverting to a blank string?
body: <p>A company that I am doing some SQL work for is having an issue with some proprietary software that was created for a Unix server. They are using it on a Windows server and it is causing 1 problem that is a fatal error for the software. This is a collection agency and the accounts have dozens of dates on them. Some dates are required (such as open date and chargeoff date) but there are several date or datetime fields that are blank and therefore NULL when uploaded. After setting the software up, the following error popped up anytime you attempt to do anything in the software:</p>
  
  <pre><code>'' is not a valid date in the lastpaymentdate DATETIME column
  </code></pre>
  
  <p>It had converted NULL (no date for this particular account in this field) into a blank string so I put a placeholder date in that column and then got an error like this:</p>
  
  <pre><code>'' is not a valid date in the firstvisit DATE column
  </code></pre>
  
  <p>So now I know what I'm up against. The software requires all of the dates to be NULL or have a properly formatted date inside of them in order to do anything really. The software is pretty much useless with this bug. </p>
  
  <p>Changing the blank date/datetime columns NULL only converts to a blank string which crashes the software.</p>
  
  <p>So I reached out to the agency that created the software and asked if they had this issue as well. I was told that they insert:</p>
  
  <pre><code>0000-00-00 or 0000-00-00 00:00:00
  </code></pre>
  
  <p>To prevent that from happening.</p>
  
  <p>I tried this and it didn't work. It took me a very long time to realize why but the company that created the software is using a Unix server (likely with PostgreSQL or MySQL 10 or something that is very slightly different).</p>
  
  <p>I was eventually able to find a temporary fix and input:</p>
  
  <pre><code>1900-01-01 or 1900-01-01 12:00:00
  </code></pre>
  
  <p>and everything works. The only problem is that 1900-01-01 / 12:00:00 is incorrect and causes a compliance issue. So it is a temporary fix, but not a good one. It is too similar to dates that can actually exist in the database.</p>
  
  <p>So I need to find something that I can use as a placeholder <strong>besides 1900-01-01 12:00:00 and 0000-00-00 00:00:00 won't work, nor will NULL.</strong></p>
  
  <p>The software is written in C# if that makes any difference.</p>