Solved

Convert Date value in Access

Posted on 2013-11-27
4
529 Views
Last Modified: 2013-11-27
I have a field in a table where the date is stored as mm/dd/yyyy, i would like to convert the date in those fields to   mm/yyyyy.


How can I do this?
0
Comment
Question by:seamus9909
  • 2
4 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 39680700
is this a text field?

If it is a date, you can change the display format of the date, but not the actual data itself.  Or you could create a query based on that table that displays the date field in that format using the format function:

MonYr: Format([DateField], "mm/yyyy")
0
 
LVL 26

Accepted Solution

by:
Shaun Kline earned 500 total points
ID: 39680704
The format command works (assuming you meant four Y's):

Format(<date>, "mm/yyyy")

If you meant storing them in that format, you would need to convert the field to a string. The date field always stores a full date, and it is up to the user to display the date in the format they choose.
0
 

Author Comment

by:seamus9909
ID: 39680712
do I put that in a query or can I change the table values themselves?
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 39680718
BTW, when I said you can change the display format, I meant in the table design view.  If you set the Format property on the General Tab of the Field Properties in table design view, the data will be displayed as mm/yyyy, but when you put your cursor in the field, it will display as the actual data.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
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 different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
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 …

757 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

19 Experts available now in Live!

Get 1:1 Help Now