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.
| Author |
Topic |
|
forefj
Starting Member
10 Posts |
Posted - 2012-08-10 : 14:42:55
|
| I have a table where I select customer purchase activity and it will display the date of purchase (along with the time) in ColumnA, in this format:2012-08-06 10:06:42.223YYYY-MM-DD HH:MM:SSI want to display the date only, so I added a LEFT function like so:LEFT(ColumnA,11)This will get rid of the time but now the date is displayed I will get:Aug 06 2012I want to display it in numeric format but as MM/DD/YYYY so it will look like:08/06/2012MM/YY/YYYYAny ideas how I can do this in T-SQL? Thanks for any assistance. |
|
|
forefj
Starting Member
10 Posts |
Posted - 2012-08-10 : 14:58:43
|
| Found the answer:CONVERT(VARCHAR(10),ColumnA,101) as [Join Date], |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|
|