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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2007-01-24 : 08:20:21
|
| Robert writes "Hi,I am really new at SQL an am basically self taught (apart from SQL for Dummies). When I am trying to create a SQL statement using various tables, my date format comes out as a 5 digit number format, i.e 34567. I need to convert the date to DD/MM/YY. The table that i am using is called Projects and the fields that I am using are called Pr_start and Pr_end. Because I have joins, they are called Projects.Pr_Start and Projects.Pr_end.Please could you show me how I would write the script to convert this date to the DD/MM/YY format.Kind regardsRobert Fish" |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-01-24 : 08:25:03
|
"my date format comes out as a 5 digit number format, i.e 34567"what date does 34567 represent ? KH |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-01-24 : 08:25:20
|
Make use of CONVERT function.Select CONVERT(datetime, 34567) Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
|
|
|