Results 1 to 8 of 8
  1. #1
    Philangr8 is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    7

    Smile Date query

    I'm trying to do a select query to automatic display the date with the next day's date from the actual date using the below formula:



    >= DateAdd("d",-1,#9/30/2009#) or <=Date()-1


    but it doesn't work. It still shows the date as 9/30/2009 instead of 10/1/2009. What am I doing wrong?

    Thanks
    Last edited by Philangr8; 10-06-2009 at 04:39 PM.

  2. #2
    Brian62 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2009
    Posts
    147

    Date Query

    Try something like this:

    Next Day: Format(DateAdd("d",1,[Audit Date]),"mm/dd/yy")
    you can change Next day to what ever column name you want.

  3. #3
    Philangr8 is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    7
    What is audit date?

  4. #4
    Philangr8 is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    7
    Do I put in the whole statement that's:

    Next Day: Format(DateAdd("d",1,[Audit Date]),"mm/dd/yy")

    but replace Next day with the column name that I have?

  5. #5
    Brian62 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2009
    Posts
    147
    yes, change to your column name.
    Last edited by Brian62; 10-06-2009 at 04:21 PM. Reason: edited

  6. #6
    Philangr8 is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    7
    I dont know what I'm doing wrong but it doesn't work. Will you post the exact formula on here for me?

    UPDATE_DATE is the date that I'm trying to change. The value is 9/30/2009. I'm trying to have it change automatically to 10/1/2009.

    Thanks

  7. #7
    Brian62 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2009
    Posts
    147
    Next Day: Format(DateAdd("d",1,[Update_Date]),"mm/dd/yy")

    Enter this statement in the field row in your query by itself in a new column. You can change Next day to whatever column name you want.

  8. #8
    Philangr8 is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    7
    Got it.

    Thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Date Query
    By drako28 in forum Queries
    Replies: 2
    Last Post: 09-10-2009, 11:11 AM
  2. Replies: 2
    Last Post: 07-31-2009, 06:56 AM
  3. Compare date in a sql query
    By access in forum Forms
    Replies: 2
    Last Post: 06-17-2009, 12:57 PM
  4. Query (Date Question)
    By cillajones in forum Queries
    Replies: 1
    Last Post: 08-09-2008, 12:05 PM
  5. Need to set date in query for automation
    By Valeda in forum Queries
    Replies: 0
    Last Post: 06-07-2006, 06:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums