title: Django Concatenate charfields and parse it as Datetime
body: <p>how are you?</p>
  <p>I have a model that has two fields named <code>start_time</code> and <code>end_time</code>, both are CharField, and this model has a relation to another model that has a field named <code>date</code> it is a DateField. It looks like this</p>
  <pre><code>class A(models.Model):
      date = models.DateField()
  
  class B(models.Model):
      relation = models.ForeignKey(A)
      start_time = models.CharField()
      end_time = models.CharField()
  </code></pre>
  <p>I need to query model B, using datetime values for example:</p>
  <pre><code>B.models.filter(reconstructed_datetime=&quot;2021-04-19 15:02:00&quot;)
  </code></pre>
  <p>where <code>reconstructed_datetime</code> is <code>date</code> (from model A) concatenated with <code>start_time</code> or <code>end_time</code> (from model B)</p>
  <p>I tryed something like this:</p>
  <pre><code>        B.objects.annotate(
              reconstructed_start=Concat(
                  F('relation__date'), Value(' '), F('start_date'),
                  output_field=CharField()
              )
          ).annotate(
              reconstructed_start_datetime=Cast(&quot;reconstructed_start&quot;, DateTimeField()),
          )
  </code></pre>
  <p>But then I tried to filter</p>
  <pre><code>        .filter(reconstructed_start_datetime=&quot;2021-04-19 15:02:00&quot;)
  </code></pre>
  <p>and it does not return my database record
  <a href="https://i.stack.imgur.com/RDcqT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RDcqT.png" alt="database record" /></a></p>
  <p>here &quot;hora_inicio&quot; is <code>start_time</code>. I suppose that use <code>Cast</code> does not work</p>
  <p>So, <strong>do you know a way to concatenate those model values and then make a query as datetime field</strong>?</p>