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 |
|
saidev
Posting Yak Master
101 Posts |
Posted - 2006-06-02 : 18:56:40
|
| Hi Guys,one of the date field in my table has mm/dd/yyyy HH:mm:ss format. i want only mm/dd/yy format.how to format this in sql. appreciate your helpTHanks |
|
|
nosepicker
Constraint Violating Yak Guru
366 Posts |
Posted - 2006-06-02 : 20:19:49
|
| CONVERT(varchar, yourdatefield, 1) |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-06-02 : 21:59:09
|
"one of the date field in my table has mm/dd/yyyy HH:mm:ss format"Do you mean you are using varchar to store date & time ? date & time value store in datetime or smalldatetime data type is in SQL Server internal format not in any other format. Use convert() to conver to your required format. Refer to Books OnLine on convert for more information KH |
 |
|
|
|
|
|