|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi all!
Need some assistance and advice to how to right a little sql statement. Not sure if this is possible, but here we go... I have a database built in access2000 and a table that tracks volunteer workers and information about them, specifically their birthdays. Now, I'm writing a query, but i need only the months from the volunteers birthdays. So, (mm/dd/yyyy) I need the mm (month) but it needs to be the actual month i.e. 12 = "December" not just 12. note: the date is stored as mm/dd/yyyy in the table Thanks in advanced! Regards, BAF Last edited by ironchef : January 7th, 2004 at 02:45 PM. |
|
#2
|
||||
|
||||
|
"the date is stored as mm/dd/yyyy" -- does this mean it's a varchar field?
because if it's a datetime field, you might have entered the dates in that format, but they are actually stored in datetime format (as two integers) if the date is a varchar field, you should change it immediately if it's a datetime field, try this: Code:
select volunteername
, format(birthday,"MMMM") as birthmonth
from volunteers
|
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > date issues in sql |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|