Time in 30-minute increments

C

caloy

I have intraday data with Date/time values. I want to be able to aggregate
the time into 30-minute segments. What functions or expressions can I use?
 
M

Michel Walsh

You can group on a computed expression, like:


CDate( CDec(#00:30:00#) * INT(CDec(yourDateTimeValue) / CDec(#00:30:00#)) )




Hoping it may help,
Vanderghast, Access MVP
 
J

John W. Vinson/MVP

I have intraday data with Date/time values. I want to be able to aggregate
the time into 30-minute segments. What functions or expressions can I use?

Try

cdate(clng(CDbl([datefield])*48)/48)
 
A

Allen Browne

caloy said:
I have intraday data with Date/time values. I want to be able to aggregate
the time into 30-minute segments. What functions or expressions can I use?

Michael has given you are very versatile expression, and John has given you
a specific answer.

Here's another way to *round* to the nearest so-many number of seconds or
minutes:
http://allenbrowne.com/round.html#RoundTime
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top