And.... use the "convert" function, for example:
convert(char(10),datevar,105) , u will have dd-mm-yyyy ... or use the format
u want to..
Bob Pfeiff <bobp(at)spectrumtech(dot)com> escribi en el mensaje de noticias
O7IFj#$9#GA(dot)270(at)cppssbbsa04(dot)(dot)(dot)
> Dates must be enclosed in single quotes in SQL Server. Use date functions
> to build queries like the one you describe. Here is an example that works
> in the pubs sample database:
>
> select
> ord_date
> from
> sales
> where
> ord_date between '9/13/94' and dateadd(dd, 7, '9/13/94')
>
> --
> Bob Pfeiff
> MCDBA, MCSD, MCSE, MCT, SQL Server MVP
> Practice Leader, Data Management
> CIBER, Washington, DC
>
>