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 |
BillEdd
Starting Member
12 Posts |
Posted - 2013-03-04 : 21:57:33
|
I have a simple select statement like:Select FN, LN, DateApplied as ApplicationDate from MyTableI am trying to use the Convert function on ApplicationDate to format it to mm/dd/yyyy so that the output is a little prettier.How and where do I insert the Convert function in the Select statement? The 101 format string is OK.ThanksBill |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-03-04 : 22:44:44
|
you should be trying to do this at front end as applying convert will make date fields come as varchar which can affect results later if you're doing some further manipulations with date like sorting etcIf you really want to do this in t-sql, useSelect FN, LN, convert(varchar(11),DateApplied,101) as ApplicationDate from MyTable ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|