Re: Sorting Crosstab after Format of Date
- From: "Duane Hookom" <duanehookom@xxxxxxxxxxxxxxxxx>
- Date: Mon, 6 Jun 2005 16:29:15 -0500
Is there a reason you couldn't use:
Format([recDate],"yy-mm") AS MyDate
--
Duane Hookom
MS Access MVP
--
"Steven M. Britton" <StevenMBritton@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:8456E63E-54F0-4591-BA13-97D8C9E8CD23@xxxxxxxxxxxxxxxx
>I am trying to get a Crosstab query to work properly. I can data to show
>but
> it is sorting
>
> Apr-04 Apr-05 Aug-04 Dec-04 Dec-05
>
> I realize that when I formatted the date in the test001 query that it
> becomes a string, but I left in the original date as my sorting option.
> However I can't get it to sort the column heading in true date sort. Help
> please.
>
> This is the cross tab query:
>
> TRANSFORM Sum(test001.Hours) AS SumOfHours
> SELECT test001.ProjectID, test001.Description, test001.Role,
> Sum(test001.Hours) AS [Total Of Hours]
> FROM test001
> GROUP BY test001.ProjectID, test001.Description, test001.Role,
> test001.MyDateSort
> ORDER BY test001.MyDateSort
> PIVOT test001.MyDate;
>
> This is the Test001 Query:
>
> SELECT Project_Tracking.ProjectID, Project_ID.Description, PERSONEL.Role,
> Project_Tracking.Hours, Project_Tracking.recDate AS MyDateSort,
> Format([recDate],"mmm") & "-" & Format([recDate],"yy") AS MyDate
> FROM PERSONEL INNER JOIN (Project_ID INNER JOIN Project_Tracking ON
> Project_ID.ProjectID = Project_Tracking.ProjectID) ON PERSONEL.Initials =
> Project_Tracking.Initials
> GROUP BY Project_Tracking.ProjectID, Project_ID.Description,
> PERSONEL.Role,
> Project_Tracking.Hours, Project_Tracking.recDate, Format([recDate],"mmm")
> &
> "-" & Format([recDate],"yy")
> ORDER BY Project_Tracking.recDate;
>
.
- Follow-Ups:
- Re: Sorting Crosstab after Format of Date
- From: Steven M. Britton
- Re: Sorting Crosstab after Format of Date
- References:
- Sorting Crosstab after Format of Date
- From: Steven M. Britton
- Sorting Crosstab after Format of Date
- Prev by Date: creating a multi part query to be able to export complete data
- Next by Date: Re: IsNULL and LEN differences
- Previous by thread: Sorting Crosstab after Format of Date
- Next by thread: Re: Sorting Crosstab after Format of Date
- Index(es):
Relevant Pages
|