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 |
sqlnewbie82
Starting Member
11 Posts |
Posted - 2007-10-22 : 09:28:33
|
hi i was wondering if it is possible to convert date/time field to string in sql |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-10-22 : 09:30:01
|
Yes.Have a look at "CAST & CONVERT" in Books Online. E 12°55'05.25"N 56°04'39.16" |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-22 : 09:32:25
|
quote: Originally posted by sqlnewbie82 hi i was wondering if it is possible to convert date/time field to string in sql
Yes but it depends on where you want to show/use formatted datesMadhivananFailing to plan is Planning to fail |
 |
|
sqlnewbie82
Starting Member
11 Posts |
Posted - 2007-10-22 : 10:59:48
|
i want to convert the date/time field to a string so that i can concatenate it with another string. if i concantentate it just like that, it will give me an error of type mismatch |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-10-22 : 11:09:19
|
The first two suggestions will give you the answer. E 12°55'05.25"N 56°04'39.16" |
 |
|
sqlnewbie82
Starting Member
11 Posts |
Posted - 2007-10-22 : 11:20:53
|
well i tried it, i am using microsoft access, so i dont think convert function is supported, coz i tried it and it said undefined function convert. so was wondering if there was another way |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-10-22 : 11:33:10
|
moved from new to sql server forum_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
|
|
|