Avatar of karinos57
Flag for Afghanistan

asked on 

date into datetime conversion

I would like to convert the date into datetime format in the sql below.  Currently my date is showing like this 09-12-2011 and would like to convert it into something like this 09/12/2011 02:10:12AM something like this.  My Date column is the post_date.  Many thanks

SELECT distinct [post_date]
      ,convert(varchar(MAX),[post_content]) [post_content]
      ,convert(varchar(64),post_title) post_title
  FROM MyTable
where category_id NOT IN (28,103)
order by post_date, convert(varchar(64),post_title) desc

Open in new window

Microsoft SQL Server 2005Microsoft SQL Server 2008SQL

Avatar of undefined
Last Comment
Kevin Cross

8/22/2022 - Mon