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 |
|
gator8869
Starting Member
37 Posts |
Posted - 2007-08-28 : 13:15:32
|
| adate atime08-21-2007 11:0908-20-2007 16:4908-03-2007 00:39I would like to combine adate with atime to get adatetime |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-28 : 13:17:00
|
SET DATEFORMAT DMYSELECT CAST(aDate + ' ' + aTime AS SMALLDATETIME)FROM Table1 E 12°55'05.25"N 56°04'39.16" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-08-28 : 13:17:56
|
| SELECT Convert(datetime,adate + ' ' + atime)Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
gator8869
Starting Member
37 Posts |
Posted - 2007-08-28 : 13:29:23
|
| Thank you...brand new to SQL programming |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2007-08-28 : 14:04:54
|
| If you use correct data types for your dates and times, you can just add them together. So converts, no string formats, no concatenation.select adate + atimefrom yourtableAlways, always use the correct data types for your data.- Jeffhttp://weblogs.sqlteam.com/JeffS |
 |
|
|
|
|
|