none
Access 2007 bug: Cannot format date field correctly - missing leading zero RRS feed

  • Question

  • Hi,

    I'm trying to format a dbDate to dd.mm.yyyy hh:nn:ss on a table declaration level. The problem is that I'm missing leading zero on hours, eg.:

    instead of 21.10.2015 07:08:09

    I get 21.10.2015 7:08:09.

    I need to make it in table declaration, ie. Format(MyDate, "dd.mm.yyyy hh:nn:ss") is not a solution.

    Any help will be appreciated. Thank you very much in advance.


    P.S. My former account was Vladimir Cvajniga but I can't access it anymore, see http://social.msdn.microsoft.com/Forums/office/en-US/5b1284eb-a74f-4c55-9d4c-d6fb6eb25d48/fatal-how-can-i-login-to-my-account?forum=Offtopic#5b1284eb-a74f-4c55-9d4c-d6fb6eb25d48.

    Wednesday, October 21, 2015 9:03 AM

Answers

All replies

  • Access seems to accept only local formats. Thus I need to enter

      tt\.mm\.jjjj hh\:nn\:ss

    because my regional setting is Switzerland to get the desired result.

    Alternatively, you could set the format to "General", but be sure to check your regional settings.

    Matthias Kläy, Kläy Computing AG

    Wednesday, October 21, 2015 9:36 AM
  • I'm afraid you're right. Unfortunately, I can't change local settings on our customers' machines. :-(

    P.S. My former account was Vladimir Cvajniga but I can't access it anymore, see http://social.msdn.microsoft.com/Forums/office/en-US/5b1284eb-a74f-4c55-9d4c-d6fb6eb25d48/fatal-how-can-i-login-to-my-account?forum=Offtopic#5b1284eb-a74f-4c55-9d4c-d6fb6eb25d48.

    Wednesday, October 21, 2015 1:17 PM