Last post Jun 03, 2013 05:10 AM by angutar
May 31, 2013 04:05 AM|angutar|LINK
my employer wants to have a form that gets you the expenses between 2 dates.
i have looked a lot on the internet but i couldn't find anything that could solve my problem.
because the problem is that the 2 dates only have a specified month and year and both are in a different field.
could you guys please help me?
May 31, 2013 04:19 AM|oned_gk|LINK
SELECT * FROM YOURTABLE WHERE DATEFIELD BETWEEN @START AND @FINIST
May 31, 2013 05:23 AM|angutar|LINK
that i know.
but how to be able to only need to specify year and month that come from 2 different date fields
May 31, 2013 05:59 AM|mishra.bhupesh|LINK
where (select [MM/YYYY] = right(convert(varchar(10),Date_Field_In_TABLE,103),7))
between (select [MM/YYYY] = right(convert(varchar(10),StartDate,103),7)) and (select [MM/YYYY] = right(convert(varchar(10),ENDDATE,103),7))
Note: StartDate , ENDDATE can have formate of dd/MM/yyyy or MM/yyyy doesn't matter.
May 31, 2013 06:14 AM|oned_gk|LINK
Jun 03, 2013 05:10 AM|angutar|LINK