I have a access DB with 2 fields "StartDate" and "EndDate"
I need now a SQL Statement which gives me all the
records which are falling in today.
Thanks in advance
Printable View
I have a access DB with 2 fields "StartDate" and "EndDate"
I need now a SQL Statement which gives me all the
records which are falling in today.
Thanks in advance
you want startdate for today or end date for today??
"SELECT * from mytable where startdate = " & datepart(now())
actually no
I need to know which record is today. - hang on
This app i am writing is an Reservation system
StartDate is arrival and EndDate is Depature
But I wnad to know how many rooms are booked today
so I need somthing like
select count(*) from table where - and now the part wher I have problems -
Is today between startdate and enddate
That's a bit unclear...
You want the number of rooms booked today... so would that be startdate = today? or do you want startdate AND endate as today?
OR you want the number of rooms currently booked, meaning that TODAY falls in between startdate and enddate... right?
so you don't even need startdate here... just end date. Today has to be less than end date.
Could u be a bit more clear?
mendhak,
Utpal from the VB DB forum answerd the question
SELECT Count(*) from table where DATE() between Start and End
Thanks for your help
I know, i saw that post.
I feel so betrayed. *sniff sniff*
heheh