Converting Dates

  • Thread starter Thread starter Heather
  • Start date Start date
H

Heather

HI,

I have a field called start date now I want to create
column/fields in QRY called JAN-DEC. Then I want to look
at a field called start date and if it is 1/1/2003 then
the amount field will be populated in the JAN column and
if their is a start date of 3/25/2003 the amount goes in
March. Any suggestions on the expression I need to do?
 
Heather said:
HI,

I have a field called start date now I want to create
column/fields in QRY called JAN-DEC. Then I want to look
at a field called start date and if it is 1/1/2003 then
the amount field will be populated in the JAN column and
if their is a start date of 3/25/2003 the amount goes in
March. Any suggestions on the expression I need to do?

Heather,
Here is a start for Jan and Feb..
You can use either of the 2 functons (Format() or Month()).
Either will do what you want.

SELECT IIf(Format([StartDate],"mmm")="Jan",[StartDate]) AS Jan,
IIf(Month([StartDate])=2,[StartDate]) AS Feb
FROM YourTable
 
Heather

Sounds a little like a cross-tab query, to generate amounts/amount totals
"by Month" and display as month columns.

Or have I misunderstood?

Good luck

Jeff Boyce
<Access MVP>
 
Back
Top