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 crosstab query



 
 
Thread Tools Display Modes
  #1  
Old February 17th, 2005, 09:45 PM
Mary
external usenet poster
 
Posts: n/a
Default DATE FORMAT in crosstab query

Access table with fields: Customer, Cust PN, Ship Date, Qty, Price

I imported an excel file into this access table. The date field in access
is set at short date. In the excel file, the date format is "3/14/2001"

The table imports fine, no errors. However, when I do a crosstab query
(using the wizard), and asking to group the dates by month, or not group at
all, or group by year, I get this error message:

compile error. in query expression 'Format([SHIP DATE], mm/dd/yy")'

I have changed the date format in both the excel and the access to every
possible combination and cannot get this query to work. The end of the error
message changes depending on how I format the date field in access. I did
not specify a date format for my query, other than to group the dates by
month, year, whatever.

Help!
  #2  
Old February 17th, 2005, 11:27 PM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default

You may have Reference errors that (quite often) affect the Format function.

See Douglas J. Steele's article:

http://members.rogers.com/douglas.j....nceErrors.html

--
HTH
Van T. Dinh
MVP (Access)


"Mary" wrote in message
...
Access table with fields: Customer, Cust PN, Ship Date, Qty, Price

I imported an excel file into this access table. The date field in access
is set at short date. In the excel file, the date format is "3/14/2001"

The table imports fine, no errors. However, when I do a crosstab query
(using the wizard), and asking to group the dates by month, or not group

at
all, or group by year, I get this error message:

compile error. in query expression 'Format([SHIP DATE], mm/dd/yy")'

I have changed the date format in both the excel and the access to every
possible combination and cannot get this query to work. The end of the

error
message changes depending on how I format the date field in access. I did
not specify a date format for my query, other than to group the dates by
month, year, whatever.

Help!



  #3  
Old February 18th, 2005, 03:31 PM
Duane Hookom
external usenet poster
 
Posts: n/a
Default

How about providing your SQL view?

--
Duane Hookom
MS Access MVP
--

"Mary" wrote in message
...
Access table with fields: Customer, Cust PN, Ship Date, Qty, Price

I imported an excel file into this access table. The date field in access
is set at short date. In the excel file, the date format is "3/14/2001"

The table imports fine, no errors. However, when I do a crosstab query
(using the wizard), and asking to group the dates by month, or not group
at
all, or group by year, I get this error message:

compile error. in query expression 'Format([SHIP DATE], mm/dd/yy")'

I have changed the date format in both the excel and the access to every
possible combination and cannot get this query to work. The end of the
error
message changes depending on how I format the date field in access. I did
not specify a date format for my query, other than to group the dates by
month, year, whatever.

Help!



 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Crosstab query and formatted date SMac Running & Setting Up Queries 1 January 27th, 2005 05:17 AM
Crosstab query has more problems Robin Running & Setting Up Queries 2 January 20th, 2005 01:23 PM
Date range in crosstab query ew Running & Setting Up Queries 6 October 4th, 2004 03:46 PM
How do I set up Date query in a crosstab query? Doddysgirl Running & Setting Up Queries 2 September 24th, 2004 08:20 PM
Aggregating Date Data into Weeks and Quarters Roger Running & Setting Up Queries 3 July 11th, 2004 05:56 PM


All times are GMT +1. The time now is 06:07 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.