在日期时间字段上添加输入掩码时数据类型错误

发布于 2024-10-01 12:20:07 字数 288 浏览 1 评论 0原文

我有一个名为 MyDate 的日期/时间字段。最初,其格式为 mm/dd/yyyy,并且没有输入掩码。日期选择器也已设置。然后,我使用 Short date 添加输入掩码,将默认输入掩码更改为 (99-99-0000;;_) 并将格式更改为 mm-dd-yyyy。但是,当我切换到 DataSheet 视图时,我的所有日​​期都从 mm/dd/yyyy 更改为 mm-dd-yyyy (这是正确的行为吗?)并且当我尝试输入新日期或修改现有日期时,它说“您输入的值与此列中的日期/时间数据类型不匹配”。另外,DatePicker 丢失了。我该如何解决这个问题。谢谢

i have a date/time field called MyDate. Originally, its format is mm/dd/yyyy and there is no input mask. The Date Picker is also set. I then added input mask using Short date , changed the default input maks to (99-99-0000;;_) and change the format to mm-dd-yyyy. However, when i switch to DataSheet view , all my dates are changed from mm/dd/yyyy to mm-dd-yyyy (which is the correct behaviour right? ) and when I tried to enter a new date or modify existing date, it says "The value you entered does not match Date/Time data type in this column". Plus, the DatePicker is missing. How can I resolve this. thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花海 2024-10-08 12:20:07

如果将输入掩码应用于字段,则日期时间选择器不可用:http://office.microsoft.com/en-us/access-help/add-and-customize-date-and-time-formats-HA010078108。 aspx#_Toc272229486

关于该错误,您是否考虑过使用控制面板中的区域设置,该设置为所有(大多数?)应用程序设置默认日期显示?

Access 中的日期存储为数字,因此您可以根据需要设置它们的格式,但我怀疑输入掩码可能需要与区域设置相匹配,尽管我不确定。

The date time picker is not available if an input mask is applied to a field: http://office.microsoft.com/en-us/access-help/add-and-customize-date-and-time-formats-HA010078108.aspx#_Toc272229486

Regarding the error, have you considered using your regional settings in the control panel, which sets the defaukt date display for all (most?) applications?

Dates in Access are stored as numbers, so you can format them however you like, but I suspect the input mask may need to match the regional settings, although I am not certain.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文