S
Steve J
I i need to group by month and year on a date field - is this possible
please?
S
please?
S
Dennis said:You could create a column in your query and then group on it.
YearMon: Year([DateField]) & Month([DateField])
Steve J said:I i need to group by month and year on a date field - is this possible
please?
S
Steve J said:That's great dennis - thanks
is it possibl;e to format the month so that they are displayed in correct
order - persumably by adding a zero if konth number < 10
Dennis said:You could create a column in your query and then group on it.
YearMon: Year([DateField]) & Month([DateField])
Steve J said:I i need to group by month and year on a date field - is this possible
please?
S
Steve J said:That's great dennis - thanks
is it possibl;e to format the month so that they are displayed in correct
order - persumably by adding a zero if konth number < 10
Dennis said:You could create a column in your query and then group on it.
YearMon: Year([DateField]) & Month([DateField])
Steve J said:I i need to group by month and year on a date field - is this possible
please?
S
Van T. Dinh said:It may be quicker to use Tina's suggestion since her suggestion involves
only 1 VBA function execution while Dennis' suggestion involves 2 VBA
function executions, 2 type-casting processes (from numeric to Text) & the
concatenating process. This, of course, hardly noticeable if you have only
small number of Records.
Try Tina's suggestion but use the formating String "yyyymm" instead, i.e.
YearMonth: Format([MyDateField],"yyyymm")
--
HTH
Van T. Dinh
MVP (Access)
Steve J said:That's great dennis - thanks
is it possibl;e to format the month so that they are displayed in correct
order - persumably by adding a zero if konth number < 10
Dennis said:You could create a column in your query and then group on it.
YearMon: Year([DateField]) & Month([DateField])
:
I i need to group by month and year on a date field - is this possible
please?
S
tina said:you're right, Van, yyyymm will allow for a better sort order, thanks for
the
tweak!
Van T. Dinh said:It may be quicker to use Tina's suggestion since her suggestion involves
only 1 VBA function execution while Dennis' suggestion involves 2 VBA
function executions, 2 type-casting processes (from numeric to Text) &
the
concatenating process. This, of course, hardly noticeable if you have only
small number of Records.
Try Tina's suggestion but use the formating String "yyyymm" instead, i.e.
YearMonth: Format([MyDateField],"yyyymm")
--
HTH
Van T. Dinh
MVP (Access)
Steve J said:That's great dennis - thanks
is it possibl;e to format the month so that they are displayed in correct
order - persumably by adding a zero if konth number < 10
You could create a column in your query and then group on it.
YearMon: Year([DateField]) & Month([DateField])
:
I i need to group by month and year on a date field - is this possible
please?
S