Solved

Calculated date field question

Posted on 2013-11-24
2
431 Views
Last Modified: 2013-11-24
I have a field in a form named "ListDate".  It is a date/time field with short date as the format.

After an entry has been made in this field I want two other fields to be calculated.

One is named "ListMonth".  The other is named "ListYear".  So using this entered date as an example...

08/30/2013

I want the first calculated date field, "ListMonth", to be 08
and
I want the other calculated date field, "ListYear" to be 2013.

How can I do this or what is the expression and/or format in the table designer?
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 39672921
You could use these expressions:

= Format(Month(ListDate), "00")

= Year(ListDate)
0
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 39672926
That said, I would use those as expressions in queries rather than calculated fields in your table.

The reason being that calculated fields are specific to certain versions of Access wheras those query expressions are more generic.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

717 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