Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to write greater than not equal in vb.net?
Posted
Comments
Kornfeld Eliyahu Peter 4-Feb-15 4:13am    
When X is greater than Y, X automatically not equal to Y...So what the question?
vetridass 4-Feb-15 4:22am    
I have 2 dates like d1= 01-01-2015 ,d2 =01-02-2015 ,in this d1 increased with 30 intervel upto say 2-2-2015 .D2 remains same , I want the value of 01-01-2015 to 31-01-2015
nagendrathecoder 4-Feb-15 4:14am    
You could have checked google.

 
Share this answer
 
Comments
vetridass 4-Feb-15 4:17am    
In that have this symbols only =(equal),<>(Not equal),>,<,>=,<= . I want to compare greater than not equal
Kornfeld Eliyahu Peter 4-Feb-15 4:39am    
But you should read the comments you got!
'greater than not equal' make no sense!!! What is greater than something else is also not equal to it...(but not the other way around), so if you check for greater, you need not to check for not equal...
nagendrathecoder 4-Feb-15 4:48am    
But suppose if your condition results in false then X may be equal to Y rite.
So to check if it is also not equal, 2nd condition is needed.
Kornfeld Eliyahu Peter 4-Feb-15 5:03am    
If X not greater than Y it can be lesser or equal...But OP didn't told that, what OP told is unclear and for that need to be clarified...
There is no reason to check for greater than and not equal, but maybe it can be reversed and to check for lesser-than-or-equal and negate it...
nagendrathecoder 4-Feb-15 5:09am    
Yes, that is rite, it can be done with <=
There is no operator to check such case.
You have to include two checks for greater than and not equal.
 
Share this answer
 
Comments
CHill60 4-Feb-15 4:42am    
Not necessary! If X is greater than Y then it cannot equal Y by definition. See the comments from Kornfeld Eliyahu Peter
nagendrathecoder 4-Feb-15 4:46am    
Correct but if X is not greater than Y then it may be equal to Y.
So second check for not equal is also required.
CHill60 4-Feb-15 4:49am    
Not what the OP asked for and still No - that can be done with a single check of less than or equal <=.
nagendrathecoder 4-Feb-15 5:08am    
Yes, that is rite, it can be done with <=

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900