hello...
i' m doing registration license system...
i need source code that can search due date by their month...
and i want to list their date with companies name..
how to combine two table in database??
because i want use the combine to search and display the data..

hello...
i' m doing registration license system...
i need source code that can search due date by their month...
and i want to list their date with companies name..

what do you want actually......select a month from a combo and search all records thats matches the selected month name?
if i'm wrong then could you explain it more clearly?

how to combine two table in database??
because i want use the combine to search and display the data..

combination means creating relationships between two or more tables. for creating relationship you need a primary key in a table and a same field with reference to the primary key(also known as Foreign key) in another table.

actually, user fill in the data with full date.. eg : 18/04/2008.. then, we want to search just by month.. eg : 09 and all due date on sept will appear in data grid.. and for your information, i use text in database and date in their input mask..

ermm.. if use the combo box, how we can link the date to database.. mean 1st combo for day, 2nd for month and 3rd for year rite?? so, how to combine this 3 combo in database.. what the source code, the sql..

and what the diff between data report n list view??

To extract a date from a string use the mid function, Mid(string, start, length) if the date is in a fixed format (i.e. mm/dd/yyyy) the the mid function would look like this, [mid(DateString,4,2)] if the date is of type date use the month function, Here is the ms HELP on the month function.

Month Function


Returns a Variant (Integer) specifying a whole number between 1 and 12, inclusive, representing the month of the year.

Syntax

Month(date)

The required date argument is any Variant, numeric expression, string expression, or any combination, that can represent a date. If date contains Null, Null is returned.

Note If the Calendar property setting is Gregorian, the returned integer represents the Gregorian day of the week for the date argument. If the calendar is Hijri, the returned integer represents the Hijri day of the week for the date argument. For Hijri dates, the argument number is any numeric expression that can represent a date and/or time from 1/1/100 (Gregorian Aug 2, 718) through 4/3/9666 (Gregorian Dec 31, 9999).

one of these two will extract the month.


the SQL to extract a month from a Date data type can be found here
http://msdn2.microsoft.com/en-us/library/aa933239(SQL.80).aspx


the SQL mid function is simular to the VB mid function and is used in the same fashion

ermm.. if use the combo box, how we can link the date to database.. mean 1st combo for day, 2nd for month and 3rd for year rite?? so, how to combine this 3 combo in database.. what the source code, the sql..

why don't use datetimepicker..

This article has been dead for over six months. Start a new discussion instead.