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 |
|
GB
Starting Member
22 Posts |
Posted - 2005-08-25 : 09:56:35
|
| Iam trying to convert a date string to date format.....in access I could just use CDate, but SQL apparently does not allow this.Any help appreciatedThanks |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2005-08-25 : 10:00:49
|
| You can use CAST or CONVERT functions (see details in Books Online)select cast('1/1/2000' as datetime) castDate, convert(datetime, '1/1/2000') convertedDateEDIT:I assume you mean convert a string to a datetime datatype.(or did you mean keep it a string but a different style of date format?)Be One with the OptimizerTG |
 |
|
|
GB
Starting Member
22 Posts |
Posted - 2005-08-25 : 10:19:11
|
| Yes convert from string to date time formatI have 2 seperate columns, "Date" and "Time" |
 |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
|
|
GB
Starting Member
22 Posts |
Posted - 2005-08-25 : 10:43:52
|
| Thanks, sorry for the crosspost |
 |
|
|
|
|
|