Use the convert function with the format 112 to convert a date to the format
"yyyymmdd":
select convert (char(8), getdate(), 112)
See
http://msdn.microsoft.com/en-us/library/ms187928.aspx for more info on
the CAST and the CONVERT functions. The result above will be of type string
but you should be OK for making your comparaison.
--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)
Independent consultant and remote programming for Access and SQL-Server
(French)
"Brad Bross" <(E-Mail Removed)> wrote in message
news:5E4C18B0-ACAF-4AE6-85B7-(E-Mail Removed)...
> Good afternoon mavens, would one of you be able to assist this tyro?
>
> I have a successful Microsoft Access SQL that reads
> " >Format(Format(Date(),"yyyymmdd"),"General Number") "
>
> Microsoft SQL Server 2005 will not accept it. Would one of you know how
> to
> convert it? Furthermore, would there be a web site any where which would
> help me with such conversions in the future? Many thx.
>
> Brad
>