conditionals

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • steven

    conditionals

    Is it possible to combine conditionals to call out data?
    I have a list of records that include a date. I can call out all dates
    after the date after tomorrow:
    IIf(Date()+1)<[date],...,...
    And I can call dates before next week:
    IIf([date]< Date()+7,...,.. .

    But I'd like to isolate those that fall between the day after tomorrow
    and next week. I was thinking that this would work, but it doesn't:

    IIf((Date()+1)<[date]<(Date()+7),... ,...

    Any hints?
  • Salad

    #2
    Re: conditionals

    steven wrote:[color=blue]
    > Is it possible to combine conditionals to call out data?
    > I have a list of records that include a date. I can call out all dates
    > after the date after tomorrow:
    > IIf(Date()+1)<[date],...,...
    > And I can call dates before next week:
    > IIf([date]< Date()+7,...,.. .
    >
    > But I'd like to isolate those that fall between the day after tomorrow
    > and next week. I was thinking that this would work, but it doesn't:
    >
    > IIf((Date()+1)<[date]<(Date()+7),... ,...
    >
    > Any hints?[/color]

    First, the word is cull, not call.

    If you are talking about this in a query
    Select * From Table
    Where DateField Between Date() + 1 And Date() + 7

    You could have done
    DateField > Date() + 1 And DateField < Date() + 7

    Comment

    • MacDermott

      #3
      OT:Re: conditionals

      "Salad" <oil@vinegar.co m> wrote in message
      news:XT34d.6658 $gG4.4241@newsr ead1.news.pas.e arthlink.net...[color=blue]
      >
      > First, the word is cull, not call.
      >[/color]

      I checked in Dictionary.Com, and found that "cull" has 2 meanings,
      1. To select or gather
      2. To remove rejected members or parts

      It looks to me as if the OP wants to select specific data, rather than
      remove it.
      So in this case, using "cull" would be pretty ambiguous.

      I think the most commonly used technical term here would be "select".
      Beyond that, I don't see that "cull" is any more desirable than "call".

      Just my opinion
      - Turtle


      Comment

      • steven

        #4
        Re: conditionals

        Salad <oil@vinegar.co m> wrote in message news:<XT34d.665 8$gG4.4241@news read1.news.pas. earthlink.net>. ..[color=blue]
        > steven wrote:[color=green]
        > > Is it possible to combine conditionals to call out data?
        > > I have a list of records that include a date. I can call out all dates
        > > after the date after tomorrow:
        > > IIf(Date()+1)<[date],...,...
        > > And I can call dates before next week:
        > > IIf([date]< Date()+7,...,.. .
        > >
        > > But I'd like to isolate those that fall between the day after tomorrow
        > > and next week. I was thinking that this would work, but it doesn't:
        > >
        > > IIf((Date()+1)<[date]<(Date()+7),... ,...
        > >
        > > Any hints?[/color]
        >
        > First, the word is cull, not call.
        >
        > If you are talking about this in a query
        > Select * From Table
        > Where DateField Between Date() + 1 And Date() + 7
        >
        > You could have done
        > DateField > Date() + 1 And DateField < Date() + 7[/color]

        Actually, I was trying to use this in a report. I want the expression
        to produce the day of the week starting from the day after tomorrow
        within the next week. Right now, the expression I'm using is very
        cumbersome:
        IIf([Date]= Date(),"Today", "") &
        IIf([Date]=(Date()+1),"To morrow","") &
        IIf([Date]=(Date()+2),For mat([Date],"ddd")," ")&
        IIf([Date]=(Date()+3),For mat([Date],"ddd")," ") &
        etc., etc.

        I was hoping to collapse the last few lines into
        IIf((Date()+2>[Date]>(Date()+7),For mat([Date],"ddd")," ")

        I don't know whether something like this is possible. Maybe there's
        something that can be added to the expression to enable this?

        Comment

        Working...