L
Lindsey M
Hi everyone, hope you are well
I am trying to write a function that I can use in my query to alocate
timeslots. Basically, I have data for each 15 min period and I want to show
it as half hourly. So, 22/09/2005 08:00:00 and 22/09/2005 08:15:00 would be
summed to show as 22/09/2005 08:00:00 and so on.
I tried this:
Code:
--------------------------------------------------------------------------------
Public Function timeslot(tstamp As Date)tstamp = DatePart("nn",
tstamp)Select Case tstamp Case 15 DatePart("nn", tstamp) = "00"
Case 45 DatePart("nn", tstamp) = "30"End SelectEnd Function
--------------------------------------------------------------------------------
but this errors saying "Invalid procedure call or argument".
If anyone could help with, I'd be very grateful - i need the solution asap!
Cheers
Linds
I am trying to write a function that I can use in my query to alocate
timeslots. Basically, I have data for each 15 min period and I want to show
it as half hourly. So, 22/09/2005 08:00:00 and 22/09/2005 08:15:00 would be
summed to show as 22/09/2005 08:00:00 and so on.
I tried this:
Code:
--------------------------------------------------------------------------------
Public Function timeslot(tstamp As Date)tstamp = DatePart("nn",
tstamp)Select Case tstamp Case 15 DatePart("nn", tstamp) = "00"
Case 45 DatePart("nn", tstamp) = "30"End SelectEnd Function
--------------------------------------------------------------------------------
but this errors saying "Invalid procedure call or argument".
If anyone could help with, I'd be very grateful - i need the solution asap!
Cheers
Linds