Solved

How display part of a date/time value on a form?

Posted on 2014-04-21
5
351 Views
Last Modified: 2014-04-21
On a form I have a date/time field that displays like this:

4/18/2014 8:28:03 AM

But I want it to display like:

4/18/2014 8:28 AM  (with no seconds showing)

Now can I do that?

--Steve
0
Comment
Question by:SteveL13
  • 3
  • 2
5 Comments
 
LVL 34

Expert Comment

by:PatHartman
ID: 40012673
You will need to define a custom format for the control.

m/d/yyyy h:nn
0
 

Author Comment

by:SteveL13
ID: 40012767
Tried that.  It still displays the seconds.

??
0
 
LVL 34

Expert Comment

by:PatHartman
ID: 40012782
If you don't have to update the value, apply the format in the RecordSource query.

Select ...., Format(yourdate, "m/d/yyyy h:nn") as formattedDate, ....
0
 

Author Comment

by:SteveL13
ID: 40012816
Here is my SQL view but it doesn't seem to like it...

SELECT tblLaborTranx.LaborTranxID, tblEmployees.FullName, tblLaborTranx.StartTime, Format(StartTime, "m/d/yyyy h:nn") as formattedStartTime,tblLaborTranx.StopTime; Format(StopTime, "m/d/yyyy h:nn") as formattedStopTime
FROM tblLaborTranx LEFT JOIN tblEmployees ON tblLaborTranx.EmployeeID = tblEmployees.EmployeeID
ORDER BY tblEmployees.FullName;
0
 
LVL 34

Accepted Solution

by:
PatHartman earned 500 total points
ID: 40012977
What error message are you getting?  If it is a message about duplicate names, then fully qualify the field names with table names when you use them in a function.

, Format(tblLaborTranx.StartTime, "m/d/yyyy h:nn") as formattedStartTime
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now