Solved

Convert Date value in Access

Posted on 2013-11-27
4
558 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
[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
4 Comments
 
LVL 48

Expert Comment

by:Dale Fye
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 48

Expert Comment

by:Dale Fye
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

627 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