Tech Support Guy banner
Status
Not open for further replies.

Date Format in Access

2K views 5 replies 4 participants last post by  downwitchyobadself 
#1 ·
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 ·
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
 
#4 ·
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
 
#6 ·
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.
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top