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
Solved

Exporting date fields to Excel

Posted on 2015-02-19
6
115 Views
Last Modified: 2015-02-19
Exporting my report from Access to Excel causes Date Fields to format incorrectly.  This can be resolved by reformatting the date column after exporting, but I would like for that to be automatic.

Attached is a sample Access database to illustrate the issue

Open the report and manually export to Excel.

Windows 7, Access 2010, Excel 2010
ExportDateIssue.accdb
0
Comment
Question by:Wayne Markel
  • 3
  • 2
6 Comments
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40619048
It's confused because of your formatting of mm-yy.

Change the report to dd-mmm-yy, and it will export fine.
0
 

Author Comment

by:Wayne Markel
ID: 40619078
Yes that works to export Day, Month, and Year, but my client wants only the month and year in the exported Excel file since it is a billing period not a billing date.  They can reformat to mm/yy after opening the Excel file, but would like that to be automatic.  Yes it is a cosmetic issue, but that is what they have requested.

Am I misunderstanding your answer?
0
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
ID: 40619098
Then I suggest changing your query to:

SELECT tblLossAllocation.ID, Format([tblLossAllocation].[BillingPeriod],"mm/yy") AS BillingPeriod
FROM tblLossAllocation;
0
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.

 

Author Closing Comment

by:Wayne Markel
ID: 40619121
Immediate response and followup.
0
 
LVL 12

Expert Comment

by:FarWest
ID: 40619160
or change the control source of the period to
=Format([BillingPeriod],"mm/yy")
(requires giving the control another name)
0
 

Author Comment

by:Wayne Markel
ID: 40619172
Super!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

856 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