Thanks Sergey,
figured as much. I guess I'll see what I can do on the VFP cursor after it is returned from SQL Server as a temporary workaround.
>>Hi,
>>
>>I've got a VFP application querying a SQL Server 2005 database.
>>
>>Some date fields on the server are 'blank' (i.e. 1900-01-01 00:00:00.000)
>>
>>How can I query the data but pull out a truly blank value?
>>
>>I would guess something like this:
>>
>>SELECT cast(case when edc_ddepart = '1900-01-01 00:00:00.000' then '' else edc_ddepart end as [datetime]) as edc_ddepart
>>
>>But that isn't doing what I expect. Or is it that what I am trying to do is wrong and I should be using NULL values for blank dates?
>
>The SQL Server doesn't support empty dates. The CAST('' AS datetime) will return 1900-01-01 00:00:00.000. The NULLs is a proper way to represent blank/unknown dates in SQL Server.