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 |
icw
Constraint Violating Yak Guru
378 Posts |
Posted - 2007-08-28 : 10:41:20
|
Hi I have a datetime column in a table.i am using DTS to export the table.I want to just get YYYYMMDD but when I export to a text file I get 2006-09-12 00:00:00:000.Can anyone give me a tip to get this out the way i want itthanks a lot |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-28 : 10:59:40
|
SELECT CONVERT(CHAR(10), Col1, 112)FROM Table1 E 12°55'05.25"N 56°04'39.16" |
|
|
icw
Constraint Violating Yak Guru
378 Posts |
Posted - 2007-08-28 : 11:03:19
|
Thanks, that's great!!what does the 112 do?CheersICW |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-08-28 : 11:06:18
|
it's a convert option.you can find it in BOL = Books Online under Convert_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-28 : 11:08:20
|
E 12°55'05.25"N 56°04'39.16" |
|
|
icw
Constraint Violating Yak Guru
378 Posts |
Posted - 2007-08-28 : 11:18:55
|
much appreciated......don't shoot! |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-28 : 11:33:00
|
I shot myself. Missed by 9 seconds... E 12°55'05.25"N 56°04'39.16" |
|
|
|
|
|