Looking for Expression using date conditions.

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

    #16
    Re: Looking for Expression using date conditions.

    "Mr.Kane" <kane.marc@gmai l.com> wrote in
    news:1149117842 .004630.168930@ i40g2000cwc.goo glegroups.com:
    [color=blue]
    > Everything looks good, however it seems that the records from
    > Dec 2004 with dates less or equal to the 15th are defaulting
    > to "YYYY00"
    >
    > ie
    > record date entered 12/5/2004 = "200400"
    > record date entered 12/11/2005 = "200500"
    > record date entered 12/2/2004 = "200400"
    >
    >
    > any additonal help would be appreciated
    >
    > (I'll try and tweak the expression and see if I can resolve
    > the conflict as well)
    >[/color]
    MonthOpened: Year([calldate])*100+IIf(Month ([calldate])=12 And
    Day([calldate])>15,100,0)+(Mo nth([calldate])+IIf(Day
    ([calldate])>15,1,0)) Mod 12+IIf(Month([calldate])=12 And Day
    ([calldate])<=15,12,0)

    Sorry again for insufficient testing.
    --
    Bob Quintal

    PA is y I've altered my email address.

    Comment

    • Bob Quintal

      #17
      Re: Looking for Expression using date conditions.

      Bob Quintal <rquintal@sympa tico.ca> wrote in
      news:Xns97D4CC5 DEAEC0BQuintal@ 207.35.177.135:
      [color=blue]
      > "Mr.Kane" <kane.marc@gmai l.com> wrote in
      > news:1149117842 .004630.168930@ i40g2000cwc.goo glegroups.com:
      >[color=green]
      >> Everything looks good, however it seems that the records from
      >> Dec 2004 with dates less or equal to the 15th are defaulting
      >> to "YYYY00"
      >>
      >> ie
      >> record date entered 12/5/2004 = "200400"
      >> record date entered 12/11/2005 = "200500"
      >> record date entered 12/2/2004 = "200400"
      >>
      >>
      >> any additonal help would be appreciated
      >>
      >> (I'll try and tweak the expression and see if I can resolve
      >> the conflict as well)
      >>[/color]
      > MonthOpened: Year([calldate])*100+IIf(Month ([calldate])=12 And
      > Day([calldate])>15,100,0)+(Mo nth([calldate])+IIf(Day
      > ([calldate])>15,1,0)) Mod 12+IIf(Month([calldate])=12 And Day
      > ([calldate])<=15,12,0)
      >
      > Sorry again for insufficient testing.[/color]

      that one has a bug too.

      this seems to work right
      MonthOpened: Year([calldate])*100+IIf(Month ([calldate])=12 And
      Day([calldate])>15,100,0)+(Mo nth([calldate])+IIf(Day
      ([calldate])>15,1,0))-IIf(Month([calldate])=12 And Day
      ([calldate])>15,12,0)

      --
      Bob Quintal

      PA is y I've altered my email address.

      Comment

      • Mr.Kane

        #18
        Re: Looking for Expression using date conditions.

        Thanks again Bob...

        Comment

        Working...