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 - 2005-10-26 : 07:25:10
|
| Andre writes "I have a a table called "Sales" and I want to take the values that look like: 20050920 in one column called SalesDate and insert it into the second column called "RevDate" where each date corresponds to the "Cust_ID"Table: SalesCust_ID | RevDate | SalesDate12534 2005092012535 2005092023774 20050418 19724 20050326In a nutshell, put the "SaleDate" in this format 2005/09/20 into "RevDate" where it corresponds to the "Cust_ID". SAo it should look like this:Cust_ID | RevDate | SalesDate12534 9/20/2005 2005092012535 9/20/2005 2005092023774 4/18/2005 20050418 19724 3/26/2005 20050326Please help my write an SQL Query to get this done"" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-10-26 : 07:28:19
|
| You can easily show this in your Front End application by formatting the date Otherwise you need to use Convert function like thisselect convert(varchar,getdate(),101)MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|