>I need to blank a datetime field in a select. What is the syntax?
>
>Ex:
>
>Select *,
> case
> When MyFlag = 1
> then MyDateTime
> else { / / } <b> ???</B>
> end as MyNewDateTime
> from MyTable
>
SQL SErver doesn't have blank date.
You can put empty string after 'else' but SQL Server will return '01/01/1900 00:00:00' as result. I guess it's it default for blank date.
Also you can use NULL to represent blank value. It depends on how you are going to use result of above SQL statement.
HTH
--sb--