Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Convert Date format

Author  Topic 

satya068
Posting Yak Master

233 Posts

Posted - 2014-11-27 : 04:46:05
Hi,

I would like to convert date to datetime in my sql query,my source data in database table is dd/mm/yyyy, i would like this to convert to dd/mm/yyyy hh:mm:ss.

MuralikrishnaVeera
Posting Yak Master

129 Posts

Posted - 2014-11-27 : 05:27:23
select CAST(CONVERT(VARCHAR(10), yourDateColumn, 101) as DATETIME)

---------------
Murali Krishna

You live only once ..If you do it right once is enough.......
Go to Top of Page
   

- Advertisement -