Solved

Calculated date field question

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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

830 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