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 |
|
duhaas
Constraint Violating Yak Guru
310 Posts |
Posted - 2008-10-02 : 15:33:06
|
I have the following:Currentdate mty_years maturity2008-10-02 12.323290 2021-02-01 I want to learn and understand a way to derive the mty_years number using sql by looking @ the currentime and figuring how the mty_years number |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-10-02 : 15:40:19
|
Or maybe the mty_years is based on a 360-day year as it often is with financial calculations?SELECT DATEDIFF(DAY, currentdate, maturity) / 360.0E0 E 12°55'05.63"N 56°04'39.26" |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2008-10-02 : 17:29:23
|
| What is the definition of "mty_years"?CODO ERGO SUM |
 |
|
|
|
|
|