To find if a date lies between a range
I have a custom table with fields Terms, Valid from date, Valid to date.
TextID1 Valid from 1.1.2007 till 31.06.2007
TextID2 Valid from 1.1.2007 till 31.12.2007
so on and so forth,
Now if the user inputes a date like 12.10.2007, i need to pick up TextID2, how do i achieve it? ( i need to find if it lies within a range)
all help is appreciated and rewarded!!