Solved

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

Posted on 2014-04-21
5
353 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 35

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 35

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 35

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…

776 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