Posted by rhaazy on 07/07/06 17:45
Take a look at this site:
http://aspalliance.com/chapters/chapters/0672323834/0672323834_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.
Navigation:
[Reply to this message]
|