By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,856 Members | 2,149 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,856 IT Pros & Developers. It's quick & easy.

How to convert a char value to date?

OraMaster
100+
P: 135
Hi All,

SQL server is very new to me.
I have one SQL
Expand|Select|Wrap|Line Numbers
  1. select ristartdt from fn_client_ri_all_rotary_years() where convert(datetime, convert(varchar(10),@Start_date, 101)) between ristartdt and rienddt
In above SQL @Start_date is an input variable. Now I want to replace it with date value in character '01-Jul-2009'. How can I do this so that this SQL will get execute?

Thanks in Advance
Bhushan
Sep 18 '09 #1
Share this Question
Share on Google+
2 Replies


ssnaik84
100+
P: 149
select ristartdt
from fn_client_ri_all_rotary_years
where convert(datetime, @Start_date, 101)
between ristartdt and rienddt

what you want to get? start date?
Sep 18 '09 #2

OraMaster
100+
P: 135
@ssnaik84
Thanks for reply :)

Kind Regds,
Bhushan
Sep 23 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.