Q:

Get Date from SQL table

I store my Java application date in database as string. NOT IN DATE FORMAT. One place I want to get this date 2013_12_9. But no respond from server. Can I do this or should I use DATE format in SQL. I can't move to date format. Any solution for this? 
I cant deal with other date values but why this:
select * from grn_final where date  between '"+date+"' and  '"+date1+"'

date means beginning date date1 is ending date. No respond when I choose above date

A:

May be better using date format instead of char. But if you can't change it, i think you should cast your date in the select (depends on your DBMS).
For instance for Oracle:
select * from grn_final where to_date(date, 'YYYY_MM_DD') between to_date('2013_12_9', 'YYYY_MM_DD') and  to_date('2013_12_10', 'YYYY_MM_DD');

But this is not very optimized.

