title: I cannot add a datetime field in django model
body: <h3>Models.py</h3>
  <pre><code>class user_Roles(models.Model):
     code = models.CharField(max_length=20)
     description = models.CharField(max_length=30)
     permitted_menus = models.CharField(max_length=200)
     created = models.DateTimeField(auto_now_add=True,blank=True,null=True)
  </code></pre>
  <p>I cannot add a datetime, date or time fields in models. It shows that &quot;[u&quot;'' value has an invalid format. It must be in HH:MM[:ss[.uuuuuu]] format.&quot;]&quot; while migrating the database. How to fix it??</p>
  <h3>Error</h3>
  <pre><code>Running migrations:
    Rendering model states... DONE
    Applying myapp.0025_auto_20160321_0913...Traceback (most recent call last):
    File &quot;./manage.py&quot;, line 10, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File &quot;/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py&quot;, line 354, in execute_from_command_line
      utility.execute()
    File &quot;/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py&quot;, line 346, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File &quot;/usr/local/lib/python2.7/site-packages/django/core/management/base.py&quot;, line 394, in run_from_argv
      self.execute(*args, **cmd_options)
    File &quot;/usr/local/lib/python2.7/site-packages/django/core/management/base.py&quot;, line 445, in execute
      output = self.handle(*args, **options)
    File &quot;/usr/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py&quot;, line 222, in handle
      executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
    File &quot;/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py&quot;, line 110, in migrate
      self.apply_migration(states[migration], migration, fake=fake, fake_initial=fake_initial)
    File &quot;/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py&quot;, line 148, in apply_migration
      state = migration.apply(state, schema_editor)
    File &quot;/usr/local/lib/python2.7/site-packages/django/db/migrations/migration.py&quot;, line 115, in apply
      operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
    File &quot;/usr/local/lib/python2.7/site-packages/django/db/migrations/operations/fields.py&quot;, line 201, in database_forwards
      schema_editor.alter_field(from_model, from_field, to_field)
    File &quot;/usr/local/lib/python2.7/site-packages/django/db/backends/base/schema.py&quot;, line 484, in alter_field
      old_db_params, new_db_params, strict)
    File &quot;/usr/local/lib/python2.7/site-packages/django/db/backends/base/schema.py&quot;, line 567, in _alter_field
      new_default = self.effective_default(new_field)
    File &quot;/usr/local/lib/python2.7/site-packages/django/db/backends/base/schema.py&quot;, line 211, in effective_default
      default = field.get_db_prep_save(default, self.connection)
    File &quot;/usr/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py&quot;, line 710, in get_db_prep_save
      prepared=False)
    File &quot;/usr/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py&quot;, line 2293, in get_db_prep_value
      value = self.get_prep_value(value)
    File &quot;/usr/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py&quot;, line 2288, in get_prep_value
      return self.to_python(value)
    File &quot;/usr/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py&quot;, line 2275, in to_python
      params={'value': value},
  django.core.exceptions.ValidationError: [u&quot;'' value has an invalid format. It must be in HH:MM[:ss[.uuuuuu]] format.&quot;]
  </code></pre>
  <p>After removing the created field also, it shows the same error..</p>