• mm/dd/yy hh:nn

    • This topic has 9 replies, 3 voices, and was last updated 16 years ago.
    Author
    Topic
    #459628

    With mm/dd/yy hh:nn as the format, it always displays 05/06/2009 09:45 as 05/06/2009 9:45.
    How can I define the format such that the time can be displayed as “09:45”.
    Thanks.
    Armstrong

    Viewing 3 reply threads
    Author
    Replies
    • #1159460

      Have you tried hh:mm, have not come accross hh:nn but I might be wrong.

      • #1159507

        Have you tried hh:mm, have not come accross hh:nn but I might be wrong.

        Zor,
        Thanks for your help. In accordance with the online help, the format specifiers for TIME should be:
        h Hour in one or two digits, as needed (0 to 23).
        hh Hour in two digits (00 to 23).
        n Minute in one or two digits, as needed (0 to 59).
        nn Minute in two digits (00 to 59).
        s Second in one or two digits, as needed (0 to 59).
        ss Second in two digits (00 to 59).
        ttttt Same as the Long Time predefined format.
        AM/PM Twelve-hour clock with the uppercase letters “AM” or “PM”, as appropriate.
        am/pm Twelve-hour clock with the lowercase letters “am” or “pm”, as appropriate.

        The screenshot shows the property settings.

        My core question: n and nn make no difference. But why?

        System Info:
        windows XP SP3
        Access 2007 SP2

        Please help. Thanks.

        Armstrong

      • #1159514

        Have you tried hh:mm, have not come accross hh:nn but I might be wrong.

        ZOR, the format is correct, nn is used so as not to confuse gainst mm which, as you know, is month.

    • #1159541

      Thanks Jezza for correcting me, thats the problem with the blind leading the blind.

      Feeling guilty, I looked around google, and found this to try. After the hh add :nn:ss, so you get hh:nn:ss. I tried it and got my screenshot, although showing all my output Does it do anything at your end?

      • #1159542

        Thanks Jezza for correcting me, thats the problem with the blind leading the blind.

        Feeling guilty, I looked around google, and found this to try. After the hh add :nn:ss, so you get hh:nn:ss. I tried it and got my screenshot, although showing all my output Does it do anything at your end?

        Zor,
        Thanks for your help. I tried out your solution in vain.
        Format property: mm/dd/yy hh:nn:ss
        The screenshot shows the hours can’t be displayed as 2 digits.

    • #1159592

      I just wonder if is something to do with your regional settings on your PC. I looked at mine and saw there were options for ommiting the leading zero on hours and minutes.

      Another link I found was :

      http://msdn.microsoft.com/en-us/library/aa227550(VS.60).aspx

      • #1159644

        I just wonder if is something to do with your regional settings on your PC. I looked at mine and saw there were options for ommiting the leading zero on hours and minutes.

        Another link I found was :

        http://msdn.microsoft.com/en-us/library/aa227550(VS.60).aspx

        Hi Zor,
        Bingo! Your solution works like a charm. Previously I thought the format specifiers could have overridden whatever regional settings.
        Thanks a lot for your help.
        Armstrong

    • #1159712

      Hey, thats good news. I’m glad my bungling along got you there. Regards

    Viewing 3 reply threads
    Reply To: mm/dd/yy hh:nn

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: