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

    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?

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

    Time Calculations in Increments

    Michelle, Feb 11, 2004, in forum: Microsoft Access Queries
    Replies:
    1
    Views:
    252
    Allen Browne
    Feb 11, 2004
  2. Praveen Manne

    Temp/Main RecNo Increments

    Praveen Manne, Jun 21, 2004, in forum: Microsoft Access Queries
    Replies:
    3
    Views:
    324
    Praveen Manne
    Jun 22, 2004
  3. Guest

    SQL string to retrieve data in increments

    Guest, May 19, 2005, in forum: Microsoft Access Queries
    Replies:
    1
    Views:
    218
  4. Kelvin Beaton

    In need to test if a task has happened in six month increments...

    Kelvin Beaton, Nov 1, 2006, in forum: Microsoft Access Queries
    Replies:
    2
    Views:
    159
    Guest
    Nov 1, 2006
  5. Guest

    Time based query - records within 10 minute intervals

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

    RE: Unix time to 15 minute increments

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

    Date/Time group by 2 hr increments.

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

    Count records in 10 minute time period

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