1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Date Format in Access

Discussion in 'Business Applications' started by Gogs, Oct 29, 2003.

Thread Status:
Not open for further replies.
Advertisement
  1. Gogs

    Gogs Thread Starter

    Joined:
    Jul 28, 2003
    Messages:
    121
    Hya folks,

    I need to enter a date in a table in access, however instead of using a normal input mask of DD/MM/YY I'd like to use the format DD.MM.YY as this is in line with the date format of all our bespoke software.

    I've tried editing the input mask list to no avail. I'd like to keep the field as a date/time field as we need to do queries using it.

    Any ideas gratefully recieved .

    Thanks

    Gogs
     
  2. Gram123

    Gram123

    Joined:
    Mar 15, 2001
    Messages:
    1,829
    In order to use the "." instead of the "/" as the date separator, you need to change the Regional Options (or Global Settings) in Windows.

    > Go to START, Settings, Control Panel, Regional Options
    > Click the Date tab
    > Change the Short Date format to dd.mm.yy
    > Change the Date Separator to .

    That should do it.

    HTH

    Gram
     
  3. Gogs

    Gogs Thread Starter

    Joined:
    Jul 28, 2003
    Messages:
    121
    Thanks Gram, that does work, but I'm wondering is there a way that it's just that particular database that has the formatting I require.

    Thanks again

    Gogs
     
  4. deej

    deej

    Joined:
    Jun 11, 2003
    Messages:
    152
    Hi Gog

    I think Gram is right about needing to change the Regional Option if you want to use "." as a date separator in an input mask. However you can use the regular input mask (using "/" as the separator) but still store your dates in the table in the format you require.

    Use input mask 00/00/00;1;_ for example (the 1 is important as it stops the date separator being stored in the table) and set the date format property to: dd\.mm\.yy (the backslashes mean the "." is interpreted as a literal character rather than as a format character - eg. decimal point).

    Dates still have to be entered as dd/mm/yy but will appear in the table as dd.mm.yy

    May not be the complete answer for you but perhaps a reasonable compromise?

    Deej
     
  5. Gogs

    Gogs Thread Starter

    Joined:
    Jul 28, 2003
    Messages:
    121
    Thanks for the advice folks.
     
  6. downwitchyobadself

    downwitchyobadself

    Joined:
    Oct 13, 2000
    Messages:
    941
    Actually, the same backslash idea can be used on the input mask. So an input mask of 00\.00\.00;1;_ will show the decimal values even during input. Keep in mind that none of these formatting questions mean squat to the data itself--Access is showing you dates, but it's storing days as integers and times as decimals. So whatever formatting, via the Input Mask and/or the Format properties, that you put on top of it, the underlying value is not affected. Though that wouldn't be the case if you substituted the second part of the input mask with a 0 instead and used decimals--that, I suspect, would cause problems.
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/175400

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice