Solved

Calculated date field question

Posted on 2013-11-24
2
430 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
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 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…

737 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