IIS ASP - ASP Dates Display

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > June 2004 > ASP Dates Display





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author ASP Dates Display
Rags

2004-06-28, 8:55 am

Hi

Use this query

Select * from <your table>
Where Month(TDate)=5 and Month(FDate)=5

Regards
Rags



>-----Original Message-----
>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
>
>
>.
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com