Reputation: 777
I want to get the future game playing date. Field game_date is in format of d/m/Y and data type is varchar.
I am running this query. There are records available in the database but this query isn't fetching any data. Please help
Query
SELECT * FROM dx_scores
WHERE
t_name='Team 11'
and username='[email protected]'
and STR_TO_DATE(game_date, '%d/%m/%Y' ) >= CURDATE();
Upvotes: 1
Views: 851
Reputation: 2129
Please try this query
SELECT * FROM dx_scores WHERE t_name='Team 11' and username='[email protected]' and DATE(game_date, '%d/%m/%Y' ) >= DATE(CURDATE());
Upvotes: 1