Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
gavakie
Posting Yak Master
221 Posts |
Posted - 2009-10-20 : 16:17:16
|
| I have a field that pull in a field like August 2009 ocp campaign. How can I convert that to say a date of 2009-08-31 or the end of whatever month name is in there? |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2009-10-20 : 16:26:27
|
| You need to CONVERT the varchar to a valid dateGive us more examples of different datesYou will need to have a "Rule" that says where the Date part stopsIn your case it looks like the EOL delimiter is the second space for your dateYou'll need to look upCONVERT, CHARINDEX, SUBSTRin BOLBrett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam |
 |
|
|
|
|
|