Results 1 to 8 of 8
  1. #1
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314

    Problem displaying date and time formateing as specified

    I have a date/time display format specified as follows: mm/dd/yy hh:mm.
    1 Access displays times for single digit hours without padding with a leading zero, even though it correctly displays leading zeros on the date when needed. This causes the date/time display to be ragged.


    2 For the year, it doesn't matter how one specifies the date custom format: mm/dd/yy, or mm/dd/yyyy, both display with 4 digits for the year.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    I'm not getting that problem in 2010 - but would comment it should be

    mm/dd/yy hh:nn

  3. #3
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314
    Quote Originally Posted by Ajax View Post
    I'm not getting that problem in 2010 - but would comment it should be

    mm/dd/yy hh:nn
    Yes, I wrote mm by mistake.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    In 2007, if the table is formatted as short time and the control uses the format function =Format([MyTime],"Short Time"), the displayed result for 8:00 is 08:00.
    Apparently, one thing that can affect the display is the use of the format property as opposed to the format function. Not sure which you are relying on since you don't say where or how you have specified the format.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Quote Originally Posted by Ajax View Post
    I'm not getting that problem in 2010 - but would comment it should be

    mm/dd/yy hh:nn
    Can't reproduce the problem in v2007, either, but oddly enough

    mm/dd/yy hh:mm

    yields the same results as

    mm/dd/yy hh:nn!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    if you use the format property or the format function, it automatically changes hh:mm to hh:nn - at least it does in 2010

  7. #7
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    It does in v2007, too, in the Property Pane...but not in VBA...and still works!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  8. #8
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314
    Quote Originally Posted by Ajax View Post
    if you use the format property or the format function, it automatically changes hh:mm to hh:nn - at least it does in 2010
    Yes, I found that out. It is interesting, that in Excel, one must use mm and not nn for the minutes.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 11
    Last Post: 07-20-2014, 06:22 PM
  2. Replies: 1
    Last Post: 03-13-2014, 07:23 PM
  3. Replies: 2
    Last Post: 02-02-2012, 06:06 AM
  4. problem with MS Time and Date Control
    By LAazsx in forum Forms
    Replies: 1
    Last Post: 12-18-2010, 08:42 AM
  5. problem in splitting Date and time fields
    By swaroop1012 in forum Queries
    Replies: 1
    Last Post: 11-22-2008, 11:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums