vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello All I have been looking over the various forums and threads trying to learn as much as I can. Here is my issue. I am trying to do the following: Write a function that involves the following: Calculates the following. 2 user inputted dates. (Ex. Jan 1 2000 -- Jan 1 2004). Figures out the number of months between the 2 dates. That number is then multiplied by a user input price that outputs some number. Problem is I am new to SQL and having some trouble getting started. Any hepl would be appreciated. |
| |||
| Take a look at this site: http://aspalliance.com/chapters/chap...3834_ch03.aspx search for the words "datediff" This is the function you will need to use, it is of the form Datediff( datepart, startdate, enddate ). This function returns the difference of two dates in units determined by the datepart argument. riley.derrick@gmail.com wrote: > Hello All > > I have been looking over the various forums and threads trying to learn > as much as I can. Here is my issue. I am trying to do the following: > > Write a function that involves the following: Calculates the > following. 2 user inputted dates. (Ex. Jan 1 2000 -- Jan 1 2004). > Figures out the number of months between the 2 dates. That number is > then multiplied by a user input price that outputs some number. Problem > is I am new to SQL and having some trouble getting started. Any hepl > would be appreciated. |
| ||||
| Thanks alot... That helps out so much. I really appreciate it. Thank you rhaazy wrote: > Take a look at this site: > > http://aspalliance.com/chapters/chap...3834_ch03.aspx > > search for the words "datediff" > > This is the function you will need to use, it is of the form > > Datediff( datepart, startdate, enddate ). This function returns the > difference of two dates in units determined by the datepart argument. > > > riley.derrick@gmail.com wrote: > > Hello All > > > > I have been looking over the various forums and threads trying to learn > > as much as I can. Here is my issue. I am trying to do the following: > > > > Write a function that involves the following: Calculates the > > following. 2 user inputted dates. (Ex. Jan 1 2000 -- Jan 1 2004). > > Figures out the number of months between the 2 dates. That number is > > then multiplied by a user input price that outputs some number. Problem > > is I am new to SQL and having some trouble getting started. Any hepl > > would be appreciated. |
| Thread Tools | |
| Display Modes | |
|
|