Forums » .NET » SQL Server »

DATE SEARCH IN ASPX PAGE


Posted Date: 10 Jul 2006      Posted By:: Naveen Gandhi     Member Level: Silver    Member Rank: 0     Points: 2   Responses: 1



Hello Friends
I am using SQL SERVER 2000 as a backend..
and storing the TIMEDATE field.. as a hh:mm am/pm dd/mm/yyyy
but i want to search the date ..
what could i write in the code that will match with it..
as user input is like.. 30 may 2006 or 30 may 06
and what is the parameter used in aspx page to find the date from database..
its urgent plzzzzzz
Regards
Naveen




Responses

#309199    Author: T.Thirumala Reddy      Member Level: Bronze      Member Rank: 0     Date: 22/Oct/2008   Rating: 2 out of 52 out of 5     Points: 4

there is no searching idea for 06 year.
then coming to other search,
you should write like this,

select * from studenttable where year(dob)='[year number]' and left(datename (mm,dob), 3)='[monthname(it must bu 3 chars)]' and day(dob)='[daynumber]'



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : trigger problem.
Previous : Any body tell good pl sql book reference URL and FAQ
Return to Discussion Forum
Post New Message
Category:

Related Messages
Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2012 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.