Welcome to SPN

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

Sign Up Now!
  1. Monthly (Recurring) Target: $300 :: Achieved: $95
      Become a Supporter    ::   Make a Contribution   

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!
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page