Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Good Day everybody!

    I have Report that has Date field and every year I am changing the criteria to the #>12/31/previous year#

    How can I make it dynamic so it will work without manual intervention? Thanks

    P.S. I have a form, I can add text box with =Format(Year(Date())) to get current year.
    However my DT field has date entered in a format as 4/20/2009.
    I will have to read last 4 characters and compare to the Year on the form...I can't figure it out...

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Try

    >DateSerial(Year(Date())-1,12,31)

    or

    >DateSerial(Year(Date()),1,0)

  3. #3
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, I totally forgot about DateSerial...

  4. #4
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have another Date issue.
    I need to have my display date to be = to the last day of the month.

    Like today I would like to see April, 30 2009


    Thanks

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You could use a text box with the following control source:

    =Date()-Day(Date())

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    Or you could use
    DateSerial(Year(Date()),Month(Date()),0)
    Wendell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •