Results 1 to 3 of 3

Thread: Future Days

  1. #1
    Join Date
    Nov 2006
    Posts
    43

    Unanswered: Future Days

    Hi,
    I’m trying to find a formula that will pull the date for the future days Tuesday, Wednesday, Thursday, and Friday.
    The formula’s I was using pulled the data from the previous week until It’s that day.
    =Format(Date()-(Weekday(Date(),2))+1,"mm/dd/yyyy")
    =Format(Date()-(Weekday(Date(),2))+2,"mm/dd/yyyy")
    =Format(Date()-(Weekday(Date(),2))+3,"mm/dd/yyyy")
    =Format(Date()-(Weekday(Date(),2))+4,"mm/dd/yyyy")
    =Format(Date()-(Weekday(Date(),2))+5,"mm/dd/yyyy")

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    And the problem is ?

    What you may be better doing is writing a function which does that for you.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,482
    Provided Answers: 11
    snap healdem that was what pop into my head


    Something like

    function MyNameDay(in_date,daynumber)
    MyNameDay = Weekday(datedif('d',daynumber,in_date),2)
    End Function

    dayname = MyNameday(#01/01/15#,-10)

    dayname will be the dayname of 10 days before #01/01/15#

    so
    dayname = MyNameday(#01/01/15#,10)

    dayname will be the dayname of 10 days after #01/01/15#

    and in a Query you can use it by


    DayName1:MyNameDay([FeildNameDatevalue],1)
    DayName2:MyNameDay([FeildNameDatevalue],2)
    DayName3:MyNameDay([FeildNameDatevalue],3)
    DayName4:MyNameDay([FeildNameDatevalue],4)
    DayName5:MyNameDay([FeildNameDatevalue],5)
    hope this help

    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.
    DONT WORRY ABOUT THOSE WHO TALK BEHIND YOUR BACK
    THEY'RE BEHIND YOU FOR A REASON

Posting Permissions

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