Home | Advertising Info4 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Friday, April 19, 2024  

  Active InfoActive Info  Display List of Info MembersMemberlist  Search The InfoSearch  HelpHelp
  RegisterRegister  LoginLogin
SQL Queries
 PowerASP Code Help Area : SQL Queries
Subject Info: date comparision A d d  -  P o s tAdd P o s t
Author
Message << Prev Info | Next Info >>
mjunior
Newbie
Newbie
Avatar

Joined: November/06/2004
Location: Brazil
Online Status: Offline
Info: 27
Added: January/18/2006 at 7:25pm | IP Logged Quote mjunior

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","abril", "maio","junho","julho","agosto","setembro","outubro","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(dumb)
Back to Top View mjunior's Profile Search for other info by mjunior
 
mjunior
Newbie
Newbie
Avatar

Joined: November/06/2004
Location: Brazil
Online Status: Offline
Info: 27
Added: February/01/2006 at 7:05am | IP Logged Quote mjunior

Please any help!!

__________________
mjunior(dumb)
Back to Top View mjunior's Profile Search for other info by mjunior
 

If you wish to make a comment to this info you must first login
If you are not already registered you must first register

  A d d  -  P o s tAdd P o s t
Printable version Printable version

Info Jump
You cannot add new info in this area
You cannot add to info in this area
You cannot delete your info in this area
You cannot edit your info in this area
You cannot create polls in this area
You cannot vote in polls in this area

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright © 1998 - 2024 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

vbscript active server pages ASP vbscript SQL database informix oracle SQL Server Perl CGI Delphi PHP source code code sample samples program CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.cjwsoft.com,www.aspclassifieds.com,www.aspphotogallery.com