how to pass parameters from forms to stored procedures

K

Krishnakanth

I am having a field called Eff_dt date type Short Date in ms Access.
I have to extract the month and year separately.
For eg. if the eff_dt is 03/01/2006 (mm/dd/yyyy). i have to extract 03
(march) alone.
i have to extract year alone. i.e, 2006
I have tried in SQL Server 2000. if i give like month(03/01/2006). It will
extract 03 alone.
I dont know the syntax in ms access.
That DB is in ms access.

please help me to fix this problem.

Krishnakanth VM
 
V

Van T. Dinh

Month([YourDateField]) and Year([YourDateField]) will give the month and the
year. Alternatively, you can use the DatePart() function.

Check Access VB help on the above-mentioned functions ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top