|
-
May 27th, 2001, 01:56 PM
#1
Thread Starter
New Member
SQL Statement
I would like to know that how can I use SQL Statement to access the data from my database , referring by the month (datatype is Date/time dd/mm/yy)
if anyone know about this SQL Statement ,please let me know.I need this code to handle with my project,
thank you very much.
KOGEPAN 
-
May 27th, 2001, 02:09 PM
#2
Frenzied Member
This is what i understood from your question you want to query your database on a date/time field, but only by month.
-
May 27th, 2001, 02:17 PM
#3
Frenzied Member
Do a search on Books Online for DatePart Function. You have to do something like
This will pull all the records for November. I hope this help.
Code:
SELECT hire_date FROM [pubs].[dbo].[employee]
where datepart(month,hire_date) = 11
Last edited by jjortiz; May 27th, 2001 at 02:22 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|