Results 1 to 5 of 5
  1. #1
    adnancanada is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    121

    Date format

    I have table name tbl_delivery it has delivery date when I run query it shows delivery date like that 4/19/2018 11:59:00 PM. when I put criteria in delivery that I need all POs delivered today.



    When I put in access query delivery date #4/19/2018# it does not give me anything. what I am missing ?

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    One way to do this is to use the date part only as your query field with the filter criteria
    Code:
    Format([Delivery date],"mm/dd/yyyy")
    There are other possible solutions
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    No problem - you've just given one of the other methods - DateValue is probably better IMO
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Downside to either is that it forces the function to be applied to the entire table, and I think you'd lose indexing. That could cause a performance problem with large tables. I'd use a method that used Between so the end date had the time added to it. That wouldn't need to be shown to the user.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 2
    Last Post: 01-14-2018, 08:59 PM
  2. Replies: 3
    Last Post: 12-30-2016, 10:27 AM
  3. Replies: 3
    Last Post: 08-20-2014, 01:47 PM
  4. Replies: 4
    Last Post: 03-12-2013, 06:49 PM
  5. Date field not in date format
    By Lorlai in forum Access
    Replies: 11
    Last Post: 06-27-2011, 05:14 PM

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