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 |
glendcruz
Yak Posting Veteran
60 Posts |
Posted - 2010-12-19 : 18:44:51
|
Can any one help me out please.I have date formats of this type4th December 201015th December 2010How can I change the format to2010/12/42010/12/15Any short approaches to it- much appreciatedThanks |
|
unfiresniper
Starting Member
5 Posts |
Posted - 2010-12-20 : 02:55:22
|
you wanna the result to be string?convert(nvarchar(50),#datetime field#,111)oryou can just use cast(year(#datetime field#) as nvarchar(4)) + '/' + cast(month(#datetime field#) as nvarchar(2)) + '/' + cast(day(#datetime field#) as nvarchar(2)) |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-12-20 : 08:50:14
|
What is the datatype of the column? Always use proper DATETIME datatype and leave formation at front end applicationMadhivananFailing to plan is Planning to fail |
|
|
|
|
|