Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

web form and birthday!!

Status
Not open for further replies.

dcampo

Programmer
Jun 13, 2006
71
EC
Hi all

I don't write very well the english, sorry!!!!

I have in my database Informix SQL a table where there's a field that containt the date of birth of many users. Now, when load my web form, I want that appear the users coincide with his date of birth of today or the month.

I tested the function DateTime but I don't know how use it!!!

help me!!

thanks
 
...the users coincide with his date of birth of today or the month.

Can you explain the format in which you want the output on your form?
Give example...

Sharing the best from my side...

--Prashant--
 
Did you save the date in database like: mm/dd/yyyy ? (Date.Today.ToShortDateString)
Or there is the time next like: mm/dd/yyyy 12:00:00 ? (Date.Today.ToString)

It is a simple select query with a simple where clause
 
thanks for response..

for example, in my web form, I wish to show the names fo users with your date of birth.

For example:

BIRTHDAY TODAY...

Jim Corrison 3 October
Paul McCantion 3 October.
.
.

or show how it:

BIRTHDAY OF MONTH

Paul McCantion 3 October
Jim Corrison 3 October
Lady Rogers 10 October
Danny Steves 30 October..
.
.

But the data is in the my Database Informix
The format of field is:
dd/mm/yy

 
For today:
Generate the taday's date (perhaps Dim d As string = Date.Today.ToShortDateString) and in the sql query: "...WHERE <dob_field>='" & d & "'". (I am not sure if # is needed).

For month:
I do not know an easy way to extract the month (using SQL code... but i am quite sure that there is). So you could use the string functions the find the first and the last instance of "/". The between is the month
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top