Learn how to a build a cloud-first strategyRegister Now


Date and Time Formatting

Posted on 2005-04-20
Medium Priority
Last Modified: 2010-05-02
I am trying to format a label to display the date and time in the following format:

ex.  10:38 AM      April 20, 2005

If I use Now, it shows correctly, but the date includes the day of the week which I don't want.  However, when I use HH:MM, I get a 24 hour format, so when in the PM, it shows hours greater than 12.  What is the best way to format the date and time to get the above example.  Thanks for the help.
Question by:alangsk
LVL 76

Accepted Solution

GrahamSkan earned 200 total points
ID: 13825041
Format(Now, "hh:nn AM/PM MMMM DD,yyyy")
LVL 38

Expert Comment

ID: 13825057
MsgBox Format(Now, "hh:nn AM/PM mmmm dd, yyyy")

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question