Hi, just to tie this thread un neatly.
I found that the code was not right, when the start time or end time rolled over onto the next day it was causing the wrong records to be diplayed. Ive got round this by creating a new variable that use IF statements to assertain the numeric value of the...
pkailas, thanks for your help.
it seems to work both ways. yours is closer to how I originally planned it in my head, but I must have been getting the parenthesis wrong, so thanks for that tip. interesting that i get the same results without the to AND statements, but I guess as long as it...
datatype of starttime and endtime are text
day is numeric
if i use the sql analyzer it returns no records. unless i change
DayDay = 6) ORDER BY StartTime DESC
to
DayDay <> 6) ORDER BY StartTime DESC
then i get one record from thursday showing up.
This currently works... unless theres something im missing, ive made the day static (varDayDayToday) and varDayDay is now only used for the main full day display of the schedule, ive made the date for that todays date as default, but it picks up the querysting ?day=1 ?day=2 etc so that i can...
i get this error when i try run that.
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
the only code that works so far is the one with the single AND
I cant get your last code to work.
Doesnt the AND statement need to be in brackets?
I always get problems when I try and use more than one AND statement.
I need to display
i.e the current band playing on stage.
the bands all have a start and end time in the schedule
I have a column for choosing the day they are on stage, so I needed to find the band on stage equal to or greater than the current time but before it has ended.
If i dont include...
Ive used what you have written to combine with the need for the records (which may not be unique) to limit to the current day
"SELECT TOP 1 * FROM schedule WHERE StartTime <> '" + FormatDateTime(NOW, 4) + "' AND (DayDay = " + Replace(rsSchedule__varDayDay, "'", "''") + ") ORDER BY StartTime...
ok, in my database i have StartTime | EndTime | DayDay
start time is in the format 22:30
end time is in the same format i.e 00:30
dayday is the numerical equiv of day of the week i.e sunday = 1, monday = 2, etc.
What i want to display is the nearest matching recording where StartTime >=...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.