Time in 30-minute increments

Discussion in 'Microsoft Access Queries' started by caloy, Jul 22, 2008.

  1. caloy

    caloy Guest

    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?
    --
    Caloyski
     
    caloy, Jul 22, 2008
    #1
    1. Advertisements

  2. caloy

    Michel Walsh Guest

    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


    "caloy" <> wrote in message
    news:...
    >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?
    > --
    > Caloyski
     
    Michel Walsh, Jul 22, 2008
    #2
    1. Advertisements

  3. On Tue, 22 Jul 2008 13:30:00 -0700, caloy
    <> wrote:

    >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)

    --

    John W. Vinson/MVP
     
    John W. Vinson/MVP, Jul 22, 2008
    #3
  4. caloy

    Allen Browne Guest

    "caloy" <> wrote in message
    news:...
    >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

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.
     
    Allen Browne, Jul 23, 2008
    #4
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michelle

    Time Calculations in Increments

    Michelle, Feb 11, 2004, in forum: Microsoft Access Queries
    Replies:
    1
    Views:
    174
    Allen Browne
    Feb 11, 2004
  2. Guest

    Time based query - records within 10 minute intervals

    Guest, Sep 22, 2007, in forum: Microsoft Access Queries
    Replies:
    1
    Views:
    464
    Allen Browne
    Sep 23, 2007
  3. KARL DEWEY

    RE: Unix time to 15 minute increments

    KARL DEWEY, Aug 25, 2008, in forum: Microsoft Access Queries
    Replies:
    3
    Views:
    591
    KARL DEWEY
    Aug 27, 2008
  4. Snickers

    Date/Time group by 2 hr increments.

    Snickers, Oct 13, 2008, in forum: Microsoft Access Queries
    Replies:
    1
    Views:
    236
    John Spencer
    Oct 13, 2008
  5. StuJol

    Count records in 10 minute time period

    StuJol, Apr 27, 2010, in forum: Microsoft Access Queries
    Replies:
    4
    Views:
    328
    Krzysztof Naworyta
    Apr 28, 2010
Loading...

Share This Page