View Single Post

   
  #3 (permalink)  
Old 04-08-2008, 06:16 PM
Bernd Giegerich
 
Posts: n/a
Default Re: How to retrieve the date part of a DATETIME column via (T-)SQL?

Hi,

> Which Sybase software are you using, ASA or ASE?


ASE 12.5.2

>>Hi,
>>
>>
>>I'm new to SQL and looking to a way to retrieve the day part of a
>>DATETIME column.
>>
>>By now I'm using CONVERT, which gives me a CHAR. To keep the result
>>sortable, I have to use a format apropriate to that demand.
>>
>>But I'd prefer getting a DATETIME back, just with cut off (or reset to
>>00:00:00.000) time part.
>>
>>Yep, I could re-convert my CHAR to DATETIME, but maybe there is a
>>better, more elegant way to achieve this?
>>
>>Regards,
>>Bernd
>>

>
>

Reply With Quote