You are here: Re: Convert Sting to Date « MsSQL Server « IT news, forums, messages
Re: Convert Sting to Date

Posted by Erland Sommarskog on 03/02/06 18:56

Crumb (rowan.ian@gmail.com) writes:
> Thanks so much for the advice but if possible I would like to pick your
> brains once more.
>
> The search still does not work, now I get nothing back because of the
> date search, even if I run the date search on its own I still get no
> returns
>
> Do I need to convert the MMColParam2 and 3 to another data type?
>
> The value of these variables is in dd/mm/yyyy format as in the data in
> my DB

No, the data in your DB is in binary format, assuming that you store the
dates in datetime. (If you store them as strings, BETWEEN is obviously
not going to work well. Not with that format.)

Since the original snippet you posted was a bit of nonsense, it is not
clear to how exactly you get the values of these variables into the SQL
statement. In fact, I don't even know if they are T-SQL variables, or
client-side variables. Could you post that you have now, including where
you declare and set these MMColParam things?


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация