Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

SQL date filter operator

Just a general date filter question, what are the valid operators for me to filter a specific timeframe as I had this error:

Cannot apply operator: date <= varchar(8)

code:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

where utc_date >= '2022-04-01'    

data type = date

>Solution :

'2022-04-01' is a varchar literal, you need to convert it to date for example by prefixing it with date:

where utc_date >= date '2022-04-01'    
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading