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
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

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
Have you tried hh:mm, have not come accross hh:nn but I might be wrong.
[quote name='ZOR' post='773937' date='06-May-2009 23:02']Have you tried hh:mm, have not come accross hh:nn but I might be wrong.[/quote]
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
[quote name='ZOR' post='773937' date='06-May-2009 16:02']Have you tried hh:mm, have not come accross hh:nn but I might be wrong.[/quote]
ZOR, the format is correct, nn is used so as not to confuse gainst mm which, as you know, is month.
Jerry
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?
[quote name='ZOR' post='774048' date='07-May-2009 14:41']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?[/quote]
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.
The following screenshot shows the format definition:
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/libr...50(VS.60).aspx
[quote name='ZOR' post='774122' date='07-May-2009 23:37']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/libr...50(VS.60).aspx[/quote]
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
Hey, thats good news. I'm glad my bungling along got you there. Regards