Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    ijaz8883 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    103
    Quote Originally Posted by moke123 View Post
    Access stores dates as the number of days since 12/31/1899. So todays date is stored as 44692.
    Jet/Ace uses the U.S. date format regardless of what format your computer is set to in your regional settings.
    Therefore to get accurate results you need to convert your international dates to a format that jet/ace uses.
    Code:
    Const conJetDate = "\#mm\/dd\/yyyy\#"
    Format(Me.txtdatefrom, conJetDate)
    Added bonus to the above is that it delimits your dates with octothorpes so access knows it is a date datatype.
    sorry bit its did'nt work for me I don't know why. but Now I have soled and I am glad

  2. #17
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    Quote Originally Posted by ijaz8883 View Post
    Sorry but my requirement was alongwith Regional Setting so I have to do this because its familiar to us. Thanks
    I meant in your code to make sure things are correctly handled regardless of the regional settings, not to display on your forms, where of course you have to display things as your local users expect..
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 15
    Last Post: 07-22-2017, 05:15 PM
  2. Search form with date
    By Delta729 in forum Forms
    Replies: 4
    Last Post: 07-14-2015, 04:56 PM
  3. Form to search for data by date range
    By andyt_2005 in forum Forms
    Replies: 3
    Last Post: 08-02-2014, 11:32 AM
  4. Replies: 4
    Last Post: 05-26-2012, 09:29 AM
  5. Search form with a date range
    By mantro174 in forum Forms
    Replies: 1
    Last Post: 02-11-2009, 10:45 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