Solved

Calculated date field question

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 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

10 Experts available now in Live!

Get 1:1 Help Now