Results 1 to 5 of 5
  1. #1
    Join Date
    May 2004
    Posts
    10

    Arrow Unanswered: UK Date format

    I am passing a date from a table to a variable in VB, but the date is being passed in US format ie 12/31/04 instead of 31/12/04, does anyone know why this is?
    I am using Access 2003 and have set the MS Office Language settings to UK but VB simply isn't having it!
    Last edited by Yeian; 05-12-04 at 10:36.

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Is that in a SQL or normal variable ?
    SQL dates must be in the american format when they are executed

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Experienced a little deja vu when I read your post. See here for some pointers to get you started.

    http://www.dbforums.com/showthread.php?t=997023

    Must say, I'm not too convinced by the MS article (depsite the wild abandon I greeted it with at the time) but I haven't really tested it to be fair, although I am sure I tried their solution in the past to no real effect.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    thinking with my fingers:

    A stores dates as doubles (days-dot-fractionalDays)

    forms take account of your environment variables (which seems reasonable since you, the happy user, are looking at them)

    ...but dates are still doubles...

    if you don't tell A what to do and there is no obvious GUI reason for A to check your settings, A defaults to US format because Mr. Gates is american.

    basically, when A takes a guess, it has to disappoint someone - Mr. G decided it was going to be the other 90% of the world's population.


    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Poor old Bill- he does try, though.

    Again, another tried, tested and abandoned method of handling dates in VBA was just to work in serial. And to set up global format constants. And the Gatesian solution. One lives and one learns.
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

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