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 |
|
JKCarter
Starting Member
4 Posts |
Posted - 2006-11-30 : 22:55:33
|
| I've made the view below to calculate the days between 10/05/06 and what ever the current date is. Then multiply the total days by 5 to feed a flash bar chart graphic. The thing I need is how would I convert this result number to currency. I'm not very good with SQL so any replies would be a great help. SELECT DATEDIFF(DAY, '2006 - 10 - 05', GETDATE()) * 5 AS DayCostFROM dbo.GraphThanks! |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-11-30 : 23:38:45
|
Convert to currency? meaning?SELECT Convert(Money, DATEDIFF(DAY, '2006 - 10 - 05', GETDATE()) * 5) AS DayCostFROM dbo.Graph Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-12-01 : 03:10:18
|
| Cant you convert it in the report you are using?MadhivananFailing to plan is Planning to fail |
 |
|
|
JKCarter
Starting Member
4 Posts |
Posted - 2006-12-01 : 08:25:40
|
quote: Originally posted by madhivanan Cant you convert it in the report you are using?MadhivananFailing to plan is Planning to fail
Thank you Gentlemen The view results go direct to a Flash bar chart application which use the number to draw the bar. So I need to convert the output to dollars in the view if there is a way. Harsh I tried the SQL you left but it did not convert the output to money for me. Sorry for my lack of knowledge, I am a web designer with database work forced upon me. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-12-04 : 09:59:09
|
| I think in Flash you can use scripts to do convertionMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|