Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2009
    Location
    Gatineau, Quebec Canada
    Posts
    147
    Provided Answers: 1

    Answered: Dates and Local Date Settings

    I have been playing with dates with multiple machines having different locale settings for dates (specifically one was "France", and the others "Canadian - Francais). Lesson learnt: date settings in forms can be affected by the regional settings; I believe that a text box, for example, by definition contains a string first, even when we enter a date, and this string is subject to the local settings for dates. Which brings me to my question:

    In the report to the food banks, I want users to be able to select clients by fiscal year. The condition I use is:

    Between #1/4/2016# and #1/4/2017# (i.e., between April 1, 2016 and April 1, 2017)

    This works, however I am wondering if would be affected by the locale setting for date (for example France vs. Canadian - Francais)? If so, how do I write the condition to ensure that the locale setting for the date would not affect the condition ( I e so that the system does not see January 4th of one year to January 4th of the next)?

    Regards

    John Smith
    Aylmer, Quebec
    Last edited by Missinglinq; 05-05-16 at 23:35.

  2. Best Answer
    Posted by Missinglinq

    "Allen Browne, who is from 'downunder,' where they also write 1/4/2016 when they mean April 1, 2016 has an excellent article on this very problem; possibly this will help you in understanding it:

    International Dates in Access

    Linq ;0)>"


  3. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    use the iso date format yyyy/mm/dd
    or spell the month eg 21 apr 2016, 03 fev 2016
    or use a combo/list box with a hidden column. the hidden column is the date value, the displayed column is as per the local language settings
    or use a datepicker control

    but Im surprised its causing that significant problems, unless its the way you are handling the data inside the form
    I'd rather be riding on the Tiger 800 or the Norton

  4. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Allen Browne, who is from 'downunder,' where they also write 1/4/2016 when they mean April 1, 2016 has an excellent article on this very problem; possibly this will help you in understanding it:

    International Dates in Access

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #4
    Join Date
    Mar 2009
    Location
    Gatineau, Quebec Canada
    Posts
    147
    Provided Answers: 1

    Fun with Dates

    Hi Linq,

    I think you / he is right; I am looking to explicitly cast dates to avoid problems, especially when working with unbound forms. Thanks again.

    John S

  6. #5
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Glad we could help!

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •