Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
Hi all,In oracle I use this query to format the date field. chg_dt is a date field in addchg tableselect to_char(chg_dt,'YYYY/DD/MM HH:MI') as date from addchg;DATECHG----------------2002/11/11 12:00How can I do this in sql server?? Seems to be too complicated... I tried using convert but couldnt get this formatselect convert(datetime, chg_dt,112) from addchgI keep getting 2002-11-11 12:00:00:000Please help thanks