Robert Dennyson (9/2/2010)
It should work
If you add the missing letter N (CON
VERT), it does work. It is an explicit conversion from datetime to varchar format, using the yyyy/mm/dd format (a format that is not locale-neutral and hence not recommended in various places, but if you need the yyyy/mm/dd format for a report, this is the function to use).
However, I fail to see the relation with the question discussed here, which is about implicit conversion from datetime to int, not about explicit conversion from datetime to varchar.
Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis