Bookmark Topic Watch Topic
  • New Topic

sql query between two dates  RSS feed

 
indika prasad kularathne
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi all,
I am using sql Server 2000 and JSP,in Sql server i have a table called UserData and it contain a data field called RegDate.
Data type use for RegDate is varchar(10).It contians data as the format dd.mm.yyyy.(but the data type is varchar)
Now i want to write a query to get data on the table between two deferent dates.

Eg:
SELECT Name,Address,Age,GPA FROM UserData WHERE RegDate BETWEEN '01.01.2004' AND '12.01.2004';

how i write a query for this task without changing the data type of the RegDate.

please help.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in more than one forum.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!