are there a simple way to select all record that are between two date. should i use datetime for filed type or i can use string type too. something like this :
SELECT * FROM users WHERE datetime_update is between date1 and date2
- i use string filed type for some reasons so that would be better.
i try this command in my c# project but it return noting. where am i miss understanding ?
SELECT user_id, sharj_value, datetime_update
FROM users
WHERE (user_id = 0653193963) AND (datetime BETWEEN '1390/07/12%' AND '1390/07/14%')
and this is sample of data in table
filed names user_id sharj_value datetime_update
0653193963 60000 1390/7/12 08:00:15
0653193963 40000 1390/7/13 08:18:44
0653193963 40000 1390/7/13 08:20:35
it suppose to return two last row i think.
Try this..