G
GwenH
I tried using Format([fieldName],"q") on a date and time field. It still
returned the date and time in the query. Then I switched to datePart. Now
it's telling me I have an extra ) in the expression. Why isn't the following
code working? (You probably only need to look at the first line and a half,
but I'm including it all just in case.)
SELECT DatePart("q",[purchase-date]) AS quarterNumber,
DatePart("q",[purchase-date]) AS monthNumber, amazonOrders.[purchase-date],
amazonOrders.[ship-state], amazonOrders.[item-price],
amazonOrders.[item-tax], amazonOrders.[shipping-price],
amazonOrders.[shipping-tax], [item-price]+[shipping-price] AS [Total Sale],
[item-tax]+[shipping-tax] AS [Total Tax]
FROM amazonOrders
WHERE (((amazonOrders.[ship-state]) Like "F*")) OR
(((amazonOrders.[item-tax])>0))
ORDER BY Format([amazonOrders].[purchase-date],"q") DESC ,
Format([amazonOrders].[purchase-date],"m") DESC;
Many thanks!
Gwen Harrison
returned the date and time in the query. Then I switched to datePart. Now
it's telling me I have an extra ) in the expression. Why isn't the following
code working? (You probably only need to look at the first line and a half,
but I'm including it all just in case.)
SELECT DatePart("q",[purchase-date]) AS quarterNumber,
DatePart("q",[purchase-date]) AS monthNumber, amazonOrders.[purchase-date],
amazonOrders.[ship-state], amazonOrders.[item-price],
amazonOrders.[item-tax], amazonOrders.[shipping-price],
amazonOrders.[shipping-tax], [item-price]+[shipping-price] AS [Total Sale],
[item-tax]+[shipping-tax] AS [Total Tax]
FROM amazonOrders
WHERE (((amazonOrders.[ship-state]) Like "F*")) OR
(((amazonOrders.[item-tax])>0))
ORDER BY Format([amazonOrders].[purchase-date],"q") DESC ,
Format([amazonOrders].[purchase-date],"m") DESC;
Many thanks!
Gwen Harrison