Roll Days to a month in Access

Mac1206

Board Regular
Joined
Jun 3, 2016
Messages
184
I have a Shipping_day Column that I need to turn into months and need some help on how to obtain this goal please...Thanks in Advance...

InvoiceInvoice_ItemShipping_Day
97749302101/5/2017
97767388401/10/2017
97767388501/10/2017
97778915901/4/2017
97793659201/9/2017
97793660201/11/2017
97793660211/11/2017
97800777201/5/2017
97807265501/5/2017

<colgroup><col><col><col></colgroup><tbody>
</tbody>


Result would be:
Group by Month:January, February, March, etc., instead of the short date above....
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Within a query the Format$ function can be used to format a date into a month:

Code:
SELECT *, [COLOR=#0000FF]Format$(Shipping_Day,"mmmm") AS ShippingMonth [/COLOR]FROM [I][B]MyTable[/B][/I]
 
Upvote 0
Within a query the Format$ function can be used to format a date into a month:

Code:
SELECT *, [COLOR=#0000FF]Format$(Shipping_Day,"mmmm") AS ShippingMonth [/COLOR]FROM [I][B]MyTable[/B][/I]

Thanks, that worked perfectly....
 
Upvote 0
Code:
SELECT *,  month ( Shipping_Day ) AS ShippingMonth FROM MyTable

if the month number is good enough this will work too

and you probably won't notice, but format is slower
 
Upvote 0

Forum statistics

Threads
1,221,691
Messages
6,161,325
Members
451,697
Latest member
pedroDH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top