473,386 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

how to compare today's month and year with every row of data from datatable?

i'm using vb.net to perform some checking.
i want to compare a set of data from database with today's month and year. i keep
the data from database as datatable and i let a string to save today's month and year.
so how do i use a for loop to compare it?
please let me know if you think the way i structure the coding is not suitable.
thanks for any suggestion, i would appreciate it very much.
Feb 26 '07 #1
3 1593
kenobewan
4,871 Expert 4TB
What are you checking? Could you return the result after running a query that presents the comparison in one table that you want?
Feb 26 '07 #2
from the database, if the used item's date is on this year, then the particular item that displayed in a checkboxlist will be checked and disabled.

so i use the id of the item (the id is get from database) to check and disable the item from checkboxlist.

how do i looop all rows from datatable using vb,net?
Feb 26 '07 #3
vijaydiwakar
579 512MB
from the database, if the used item's date is on this year, then the particular item that displayed in a checkboxlist will be checked and disabled.

so i use the id of the item (the id is get from database) to check and disable the item from checkboxlist.

how do i looop all rows from datatable using vb,net?
u should try
Expand|Select|Wrap|Line Numbers
  1.  
  2. dim dRow as datarow
  3. for each drow in datatable
  4. 'check code
  5. next
  6.  
Feb 26 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: alexis | last post by:
Hi, In a form I have the curent date <input name="datetoday" type="hidden" value="<? echo date("d/m/Y"); ?>"> and <input type=text name="datebox" size=15> The date format is d/m/Y...
4
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and...
8
by: peashoe | last post by:
I have an asp page that uses a calendar.js (pop-up) file to add an exact date format in the text field (txtDDate). My problem is I need some javascript that sets an alert that does not allow them...
8
by: Zero.NULL | last post by:
Hi, We are using Month-year tables to keep the history of long transaction of our application. For example: We capture the details of a certain action in table...
13
by: SimonC | last post by:
I would like to return data from the last 2 weeks of each given month in Javascript, but in 2 formats. So, the penultimate week (Monday to Sunday) and the last week (Monday to ??) I'm not...
12
by: Assimalyst | last post by:
Hi, I have a working script that converts a dd/mm/yyyy text box date entry to yyyy/mm/dd and compares it to the current date, giving an error through an asp.net custom validator, it is as...
4
by: crane.jake | last post by:
Hi, I'm trying to find the following information from the table found bellow. Year_Sales - # of sales that have occurred this year Year_Income - SUM(amount) Month_Sales - # of sales that have...
25
by: Brian | last post by:
I have a datetimepicker formated for just time, the user selects the time. I want to compare if that time is between midnight and 8 am dtmTime #11:59:59 PM# and dtmTime < #08:00:00 AM# this...
1
by: ghjk | last post by:
I want to compare date in java script for validation. This is my code. var currentDate = new Date() var day = currentDate.getDate() var month = currentDate.getMonth() var year =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.