Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server functions 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 Ac…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

920 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

14 Experts available now in Live!

Get 1:1 Help Now