Results 1 to 4 of 4
  1. #1
    fishhead is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    115

    Date Expression

    Can someone please tell me how to do the following:



    [pymt request date] field is populated with date info in the following format: "4/06/20 3:26:43 PM"

    I'm creating an "IF" stmt to be used in a macro as follows: IF [Forms]![fPRList]![pymt request date]=Date()

    and i'm hoping to return the records that have the date 4/06/20 (regardless of what time is stated afterwards)


    Do i need to do something else with this statement to just reference the Date and not the time portion ?

    thanks in advance,

  2. #2
    fishhead is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    115
    i just found a work around.... thanks to all anyway

  3. #3
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    604
    [pymt request date] >= #4/6/20# AND [pymt request date] < #4/7/20#

    Or

    Int([pymt request date]) = int(#4/6/20#)

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    21,212
    Posting your solution could help others. I'd probably use

    IF DateValue([Forms]![fPRList]![pymt request date])=Date()
    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: 03-12-2018, 08:16 AM
  2. Date format and expression
    By cenibyte in forum Queries
    Replies: 8
    Last Post: 04-11-2016, 11:32 AM
  3. Replies: 3
    Last Post: 12-02-2014, 07:58 PM
  4. Date expression
    By shralpy in forum Access
    Replies: 3
    Last Post: 12-01-2011, 04:01 PM
  5. Date expression issues
    By QTip in forum Queries
    Replies: 4
    Last Post: 01-06-2011, 03:43 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 - Senior Forums