Solved Create Query to add "Month" using the record date file "Order_Date"

Number11

Member
Local time
Today, 08:24
Joined
Jan 29, 2020
Messages
607
Looking to convert a dates
04/01/2023 to "January 23"
01/02/2023 to "February 23"

and so on possible to have both i can get the month only using this

Month: Month([Order_Date]) shows as month number not text
 
Last edited:

Josef P.

Well-known member
Local time
Today, 09:24
Joined
Feb 2, 2023
Messages
826
04/01/2023:
Format(#1/4/2023#, "mmmm yy")

How to convert 04/01/2023 to VBA date?
Try: DateTypeVariable = Cdate("04/01/2023")
.. This will only work with the appropriate country setting.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 08:24
Joined
Feb 19, 2013
Messages
16,612
use the format function

format(myDate,"mmmm yy")
 

CJ_London

Super Moderator
Staff member
Local time
Today, 08:24
Joined
Feb 19, 2013
Messages
16,612
just be aware that the format function creates a string - so will not sort in month order (e.g. April will come before January)

if these date values are fields in a table or query or displayed in a control as a value, there is also the format property which could simply be populated with 'mmmm yy' which will not change the underlying value so sorting will be unaffected.
 

Users who are viewing this thread

Top Bottom