Thursday, February 18, 2010

SQL - Simple example (Display Date, truncate string, etc)

Below is a simple example to only display "date" information from a field of DateTime:

CONVERT(varchar,create_timestamp,101) as create_date

Below is an example to truncate string:

left(reason,25) as reason

No comments: