Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Convert Date value in Access

Posted on 2013-11-27
4
Medium Priority
?
563 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 27

Accepted Solution

by:
Shaun Kline earned 2000 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

719 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