We cannot say how to solve this completely. But you can convert your column into a type date
by using an appropriate date pattern. In this example the dates could like this: 2020-01-15
. So the pattern to convert this into a date would be year-month-day which is YYYY-MM-DD
. Any other pattern is possible.
SELECT
*
FROM mytable
WHERE to_date(date_of_joining, 'YYYY-MM-DD')
BETWEEN CURRENT_DATE AND CURRENT_DATE - interval '15 days'
EDIT (user added sample data):
demo:db<>fiddle
In your case the date pattern would be: 'DD-Mon-YY'
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…