freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Winkless, Geoff" <geoff.winkless AT pera.com>
- To: 'TDS Development Group' <freetds AT franklin.metalab.unc.edu>
- Subject: Re: CONVERT and MSSQL
- Date: Mon, 11 Mar 2002 16:48:59 -0000
I wrote:
> However the whole point was that although there may well be
> -better- ways of
> checking a year/date combination, the LIKE '2001-03%' example
> shown -should-
> work, and it'd be interesting to see why it doesn't.
And of course Simon Matthews hinted at this: force the CONVERT() function to
use the ISO date format using the optional STYLE parameter (position 3)
so
WHERE CONVERT (varchar(20), column_name, 121) LIKE '%2001-03-%'
works exactly as expected (although of course is not recommended for the
reasons already discussed!)
Further values for the STYLE parameter can be found in the TSQL
documentation.
Geoff
-
CONVERT and MSSQL,
Mark, 03/11/2002
- <Possible follow-up(s)>
- RE: CONVERT and MSSQL, Matthews Simon, 03/11/2002
- Re: CONVERT and MSSQL, Kaeptn Weltall, 03/11/2002
- Re: CONVERT and MSSQL, Joshua Stein, 03/11/2002
- Re: CONVERT and MSSQL, mitch, 03/11/2002
- Re: CONVERT and MSSQL, Winkless, Geoff, 03/11/2002
- Re: CONVERT and MSSQL, Winkless, Geoff, 03/11/2002
Archive powered by MHonArc 2.6.24.