Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Query time range

Discussion in 'Information Technology' started by stillwalkingaway@gmail.com, Jul 28, 2006.

Tags:
  1. stillwalkingaway@gmail.com

    stillwalkingaway@gmail.com
    Expand Collapse
    Guest

    hi. i was wondering how i would set a time range so that the
    DBatch.start field will display a range from 6PM yesterday or
    tuesday(any weekday) to 5:59PM the next day i.e. today/wednesday.
    Here's what i have:

    SELECT DBatch.batchname, DBatch.start AS StartTime, DBatch.end,
    DBatch.duration, DBatch.recordcount
    FROM DBatch
    WHERE ????
    ORDER BY DBatch.start;

    Both the DBatch.start and the DBatch.end fields are in the Date/Time
    format.
    Thanks.
     
  2. Loading...

    Similar Threads Forum Date
    Query about Jhatka Meat by Shooting in Head Sikh Sikhi Sikhism Aug 26, 2011
    Who is a sikh? A non sikh friend's query!! Sikh Sikhi Sikhism Apr 30, 2010
    General Query Hard Talk Sep 4, 2008
    Power of pauri's in Japji Sahib query Sikh Sikhi Sikhism Aug 17, 2006
    Sikhism a query Book Reviews & Editorials Aug 2, 2005

  3. Pieter Wijnen

    Pieter Wijnen
    Expand Collapse
    Guest

    if you don't mind next /or previous day to be a holiday, saturday or sunday
    SELECT DBatch.batchname, DBatch.start AS StartTime, DBatch.end,
    DBatch.duration, DBatch.recordcount
    FROM DBatch
    WHERE DBatch.start >= Date() -1 + 18/24
    AND DBatch.start < Date() + 18/24
    ORDER BY DBatch.start;

    else you'll have to use some calculations in addition
    If I'm not mistaken Allen Browne has some excellent code to use to discount
    Sa,Su & holidays

    HTH

    Pieter

    And I'm aware 18/24 equals 3/4 equals 0.75 - but it's more understandable
    (if not as fast) <g>



    <stillwalkingaway@gmail.com> wrote in message
    news:1153946144.151558.186920@b28g2000cwb.googlegroups.com...
    > hi. i was wondering how i would set a time range so that the
    > DBatch.start field will display a range from 6PM yesterday or
    > tuesday(any weekday) to 5:59PM the next day i.e. today/wednesday.
    > Here's what i have:
    >
    > SELECT DBatch.batchname, DBatch.start AS StartTime, DBatch.end,
    > DBatch.duration, DBatch.recordcount
    > FROM DBatch
    > WHERE ????
    > ORDER BY DBatch.start;
    >
    > Both the DBatch.start and the DBatch.end fields are in the Date/Time
    > format.
    > Thanks.
    >
     
  4. Pieter Wijnen

    Pieter Wijnen
    Expand Collapse
    Guest

    if you don't mind next /or previous day to be a holiday, saturday or sunday
    SELECT DBatch.batchname, DBatch.start AS StartTime, DBatch.end,
    DBatch.duration, DBatch.recordcount
    FROM DBatch
    WHERE DBatch.start >= Date() -1 + 18/24
    AND DBatch.start < Date() + 18/24
    ORDER BY DBatch.start;

    else you'll have to use some calculations in addition
    If I'm not mistaken Allen Browne has some excellent code to use to discount
    Sa,Su & holidays

    HTH

    Pieter

    And I'm aware 18/24 equals 3/4 equals 0.75 - but it's more understandable
    (if not as fast) <g>



    <stillwalkingaway@gmail.com> wrote in message
    news:1153946144.151558.186920@b28g2000cwb.googlegroups.com...
    > hi. i was wondering how i would set a time range so that the
    > DBatch.start field will display a range from 6PM yesterday or
    > tuesday(any weekday) to 5:59PM the next day i.e. today/wednesday.
    > Here's what i have:
    >
    > SELECT DBatch.batchname, DBatch.start AS StartTime, DBatch.end,
    > DBatch.duration, DBatch.recordcount
    > FROM DBatch
    > WHERE ????
    > ORDER BY DBatch.start;
    >
    > Both the DBatch.start and the DBatch.end fields are in the Date/Time
    > format.
    > Thanks.
    >




    --
    ----------------------------------------
    I am using the free version of SPAMfighter for private users.
    It has removed 4367 spam emails to date.
    Paying users do not have this message in their emails.
    Get the free SPAMfighter here: http://www.spamfighter.com/len
     
  5. jmonty

    jmonty
    Expand Collapse
    Guest

    Look to the experts for your answers:
    http://www.mvps.org/access/datetime/index.html

    jmonty


    "stillwalkingaway@gmail.com" wrote:

    > hi. i was wondering how i would set a time range so that the
    > DBatch.start field will display a range from 6PM yesterday or
    > tuesday(any weekday) to 5:59PM the next day i.e. today/wednesday.
    > Here's what i have:
    >
    > SELECT DBatch.batchname, DBatch.start AS StartTime, DBatch.end,
    > DBatch.duration, DBatch.recordcount
    > FROM DBatch
    > WHERE ????
    > ORDER BY DBatch.start;
    >
    > Both the DBatch.start and the DBatch.end fields are in the Date/Time
    > format.
    > Thanks.
    >
    >
     
  6. adamantium

    adamantium
    Expand Collapse
    Guest

    Thanks do much for all your help!
     
  7. adamantium

    adamantium
    Expand Collapse
    Guest

    Thanks so much for all your help!
     

Share This Page