A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date format in query export.



 
 
Thread Tools Display Modes
  #1  
Old February 9th, 2010, 09:32 PM posted to microsoft.public.access.queries
Hansplay
external usenet poster
 
Posts: 5
Default Date format in query export.

I am exporting a query to a .csv file. In a Date field I formatted as so:

FormattedActivityDate: Format([Activity Date],"yyyy/mm/dd")

The date in the .csv file shows up in the format, "m/dd/yyyy".

Anyone know what I am doing wrong?

Thanks.
  #2  
Old February 9th, 2010, 10:53 PM posted to microsoft.public.access.queries
Duane Hookom[_4_]
external usenet poster
 
Posts: 316
Default Date format in query export.

Are you certain the field is a date field and not text?

Duane Hookom
MS Access MVP

"Hansplay" wrote in message
...
I am exporting a query to a .csv file. In a Date field I formatted as so:

FormattedActivityDate: Format([Activity Date],"yyyy/mm/dd")

The date in the .csv file shows up in the format, "m/dd/yyyy".

Anyone know what I am doing wrong?

Thanks.


  #3  
Old February 9th, 2010, 11:16 PM posted to microsoft.public.access.queries
Hansplay
external usenet poster
 
Posts: 5
Default Date format in query export.


The data type in the table for this field is "Date/Time" and the format is
'Medium Date".

Thanks

"Duane Hookom" wrote:

Are you certain the field is a date field and not text?

Duane Hookom
MS Access MVP

"Hansplay" wrote in message
...
I am exporting a query to a .csv file. In a Date field I formatted as so:

FormattedActivityDate: Format([Activity Date],"yyyy/mm/dd")

The date in the .csv file shows up in the format, "m/dd/yyyy".

Anyone know what I am doing wrong?

Thanks.


  #4  
Old February 9th, 2010, 11:46 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Date format in query export.

On Tue, 9 Feb 2010 13:32:05 -0800, Hansplay
wrote:

I am exporting a query to a .csv file. In a Date field I formatted as so:

FormattedActivityDate: Format([Activity Date],"yyyy/mm/dd")

The date in the .csv file shows up in the format, "m/dd/yyyy".

Anyone know what I am doing wrong?

Thanks.


Access ignores the format property of a field in the export. Are you certain
that you're exporting the text string generated by the Format() function call?
or perhaps the export is exporting the actual date/time field? Perhaps you
could post the SQL of the query that you're exporting.
--

John W. Vinson [MVP]
  #5  
Old February 10th, 2010, 02:14 PM posted to microsoft.public.access.queries
Hansplay
external usenet poster
 
Posts: 5
Default Date format in query export.

John, here is the SQL of the query.

SELECT tblLabourTransaction.[CWA Number],
tblLabourTransaction.[SubContractor ID], [My Company Contract #] & "-" &
Format([ReferenceNumber],"000000") AS ContractorReferenceNumber,
Format([Customer Employee ID],"00000") AS [Client Employee ID],
Format([ActivityDate],"yyyy/mm/dd") AS FormattedActivityDate,
tblLabourTransaction.AccountCode, tblLabourTransaction.[Reason Code],
tblLabourTransaction.Hours, tblLabourTransaction.[Work Order],
tblLabourTransaction.CraftCode, tblLabourTransaction.Schedule,
tblLabourTransaction.[Cost Center], tblLabourTransaction.Activity,
tblLabourTransaction.[Equipment ID], tblLabourTransaction.[End User Signoff],
tblLabourTransaction.[Activity Description]
FROM tblLabourTransaction
WHERE (((tblLabourTransaction.[Batch
Number])=[Forms]![frmExportMenu]![cmboBatchtoExportLab]));

Thanks.

"John W. Vinson" wrote:

On Tue, 9 Feb 2010 13:32:05 -0800, Hansplay
wrote:

I am exporting a query to a .csv file. In a Date field I formatted as so:

FormattedActivityDate: Format([Activity Date],"yyyy/mm/dd")

The date in the .csv file shows up in the format, "m/dd/yyyy".

Anyone know what I am doing wrong?

Thanks.


Access ignores the format property of a field in the export. Are you certain
that you're exporting the text string generated by the Format() function call?
or perhaps the export is exporting the actual date/time field? Perhaps you
could post the SQL of the query that you're exporting.
--

John W. Vinson [MVP]
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.