Results 1 to 12 of 12
  1. #1
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936

    Working with dd/mm/yyyy

    I have a continuous form with dates in the European format (I use USA). When the user tries to filter on these dates - right-click, filter between - he gets an invalid date error. The data is stored with date and time and is displayed with short date format.



    I have tried everything!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    And what is 'everything'? Can Allen help > http://allenbrowne.com/ser-36.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Thanks for that. It doesn't seem to answer the issue, however. This is a straight display of the date, when you try and filter it a calendar popup is displayed, there is no intervention. Why can you not pick "today" for instance, or any day you want, and Access must recognize it based on your regional settings?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Since I don't have to deal with non-US dates, hard for me to advise. I know that whenever I download db with non-US dates, drives me nuts trying to work with.

    I thought Allen's tutorial is supposed to handle the translation between user entries of 4/7/2017 as DD/mm/yyyyy and storing as 7/4/2017 MM/DD/YYYY. Otherwise, I am lost on the issue.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Is that the issue, that I am supposed to handle it? Rewrite the calendar popup that Access provides? There must be a simpler way! Thanks for trying, maybe one of our helpers from across the pond has the answer.

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

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    And Allen is in Australia where international date format is the convention.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Thanks, Orange - but no VBA code involved here.

  9. #9
    Join Date
    Apr 2017
    Posts
    1,793
    Always works DateSerial()

    Like
    Code:
    DateSerial(Year(YourDate),Month(YourDate),Day(YourDate))
    Another way independent of regional settings is to handle dates as long integers (or Double, when time part is included) in formulas/queries.
    Last edited by ArviLaanemets; 12-05-2017 at 07:33 AM.

  10. #10
    Minty is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,159
    Access will always display a date based on the users local settings. In the UK that means dd/mm/yyyy .
    As long as your dates are stored as DateTime fields and you aren't trying to use VBA to manipulate them you don't need to worry about the formatting.

    I'm intrigued that you get a date picker when you right click to filter though - I've not seen that behaviour ? I'm using Access 2010, and I get a list of possible conditions e.g this year, this week etc.
    The only time the date picker appears is when I'm doing data entry.

    If the control is locked - picking today from the date picker won't do diddly, it certainly won't filter.

  11. #11
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Gone to other forum, will post back if I find a solution.

  12. #12
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    For anyone interested in this, I was directed to another thread which is still unresolved. Looks like it is an Access bug, altho it was around in 2010 if not before.
    https://access-programmers.co.uk/for...d.php?t=255995

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

Similar Threads

  1. How to covert yyyymmdd to mm/dd/yyyy
    By adnancanada in forum SQL Server
    Replies: 6
    Last Post: 10-20-2017, 04:30 PM
  2. default value of yyyy.mm
    By tagteam in forum Access
    Replies: 4
    Last Post: 11-12-2015, 11:04 AM
  3. Conditionally formatting a mm/dd/yyyy*
    By Steve3415 in forum Reports
    Replies: 4
    Last Post: 03-11-2012, 02:36 PM
  4. InputMask yyyy-mm for Label
    By smaky in forum Queries
    Replies: 5
    Last Post: 11-03-2010, 10:20 AM
  5. Convert to MMM/YYYY
    By Brian62 in forum Queries
    Replies: 10
    Last Post: 08-31-2009, 04:54 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