Click here to Skip to main content
15,904,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have table MemberInfo(

DOB varchar (20)


it store birthdate in dd-MMMM formate i.e. 17-July

pls help me to find upconig birthdate
StianSandberg 18-Jul-12 8:36am    
You really should keep dates as date. Your column should be a DateTime datatype. Now you will have to first convert the varchar and then query for dates upcoming.

1 solution

select convert(varchar(15),birthdate ,106) from you table name
Share this answer
Nandkumar Sharma 18-Jul-12 9:02am    
hi thanks for reply i had did it bu it show error
Conversion failed when converting datetime from character string.
bcoz of dob stored in "18-July" format not year included
Vasim889 19-Jul-12 0:51am    
you will try this one.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900