title: Searching data older than a Date with typeORM
body: <p>I am executing a query to <strong>Postgre DB</strong> to fetch data older than a specific date.</p>
  
  <p>Here's my function </p>
  
  <pre><code>async filesListToDelete(): Promise&lt;any&gt; {
    return await this.fileRepository.find({
      where: { last_modified: { $lt: '2018-11-15 10:41:30.746877' } },
    });
  }
  </code></pre>
  
  <p>Here's how I defined my File entity:</p>
  
  <pre><code>export class File {
    @PrimaryGeneratedColumn()
    id: number;
  
    @Column({ nullable: false })
    idFonc: number;
  
    @Column({ nullable: false })
    version: number;
  
    @Column('varchar', { length: 100, nullable: false })
    filename: string;
  
    @Column({ nullable: true })
    last_modified: Date;
  
    @Column({ nullable: false })
    device: boolean;
  
    @ManyToOne(type =&gt; Type, { nullable: false })
    @JoinColumn({ referencedColumnName: 'id' })
    type: Type;
  
    @OneToMany(type =&gt; FileDevice, filedevice =&gt; filedevice.file)
    fileDevice: FileDevice[];
  }
  </code></pre>
  
  <p>I get this error </p>
  
  <pre><code>QueryFailedError: invalid input syntax for type timestamp: "{"$lt":"2018-11-15 10:41:30.746877"}"
  </code></pre>