06-28-04 01:55 PM
SQL Server, Access, FoxPro, Sybase, Oracle, DB2, MySQL, Firebird, ...?
Preferably you can do this in the database without worrying about silly date
formatting within ASP. However, the database vendor, product and version
will be useful information in providing an answer.
--
http://www.aspfaq.com/
(Reverse address to reply.)
"JP SIngh" <none@none.com> wrote in message
news:#HMUzNPXEHA.500@TK2MSFTNGP09.phx.gbl...
> Hi All
>
> I have a tricky question wonder if anyone can help.
>
> I store dates in my table as
>
> FDate TDate NoDays
>
>
> Where Fdate is From Date
> TDate is To Date
> NoDays is number of days.
>
> We use this to record holidays for our employees.
>
> I would like to write a SQL query which will display all the records where
> Fdate or Tdate are within the current month. Not very good at writing SQL
> hence need some help.
>
> Some sample data can be like this
>
> Fdate TDate NoDays
> 15/05/04 18/5/04 4
> 29/04/04 2/5/04 5
> 29/5/04 3/06/04 4
>
> If that was the data in the my table and running this query I would expect
> it include all the three records when searching for month of "May" as all
> three records have atleast one day which falls in the month of May
>
> thanks for your help
>
> Jas
>
>
[ Post a follow-up to this message ]
|