Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 02-01-2006, 09:37 AM date comparision
Junior Talker

Posts: 3
Trades: 0
Guys,

I have a fail date comparision on my sql statement : month(search.fields("variable"))= m
that don't find the equivalent data.

The variable m, indicte the month number and I use it as reference to the array to print the month name:
month=array("","janeiro","fevereiro","março","abri l", "maio","junho","julho","agosto","setembro","ou tubr o","novemb ro","dezembro")
m=DatePart("m",(date()))

Anyone have some clue to help compare correctly the date in order to select all the data which the field matches with "m" on my db??

Already tried switch = to like, but works ony partialy, cause I have a mismatch on the following situations: 1,11,12 e 10

Also tested the comparision by printing the variables on a test page (they print exactly the same Ex. m=1 and month(search.fields("variable"))=1 )
Also tested the type of data by using the isnumeric test and both returned true.
mjunior is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-15-2006, 02:45 PM Re: date comparision
Junior Talker

Posts: 3
Trades: 0
SELECT FieldDate FROM YourTable WHERE DATEPART(mm,FieldDate)=" & yourvariable
mstrsftwr is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to date comparision
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21176 seconds with 12 queries