954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Date of Birth

I am developing a job portal and i want the end user to enter his/her D.O.B..for that I want to create 3 dropdown one for..day,second for month and third for year..since I'm new to asp.net 2.0 my problem is how to program to as to get the values of all the 3 dropdown boxes..into one field. Can anyone help me out? If source code is available..then it's really nice.
thanks..in advance
shraddha

shraddha24
Newbie Poster
7 posts since Dec 2008
Reputation Points: 10
Solved Threads: 0
 

When the data is posted onto the receiving page, you'll get say

month=5
Day=8
year = 1945

(not my birthday!!)

you would then - add them up like a human would to form a date like string such as "8/5/1945" and try and convert it to a date, if it succeeds they it was ok however if they entered something like 31st september.. it woudl fail and you know they need to check what they entered

LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
 

Thanks Liza,
Even I was thinking on a same note..and then will I have to take the database..field datetime...n then string.parse to datetime..field..n at the time of editing the user again gets the string format of datetime..but may be at the time of editing the end user may also see the time..because..datetime takes time by default. Any suggestions?
Well I'm going to give it a try.
anyways thanks
shraddha

shraddha24
Newbie Poster
7 posts since Dec 2008
Reputation Points: 10
Solved Threads: 0
 

Then you need to ensure your formatting for that field removes any time portion.

Also, dont rely on the DB to do the date validation, do it before you try storing the data

LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
 
Jugortha
Junior Poster
172 posts since Oct 2007
Reputation Points: 11
Solved Threads: 16
 

Date of birth on a job portal? Are you mad?

Rashakil Fol
Super Senior Demiposter
Team Colleague
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177
 

Are you mad rashakil ? How will a company identify that a particular employee fits in the specified age group of employees for a particular job. Go through some of the job portals and u'll know what I'm saying..Anyways..why am I explaining you

shraddha24
Newbie Poster
7 posts since Dec 2008
Reputation Points: 10
Solved Threads: 0
 

DOB shouldnt matter if someones capable of doing a job they are capable however, I dont see why it shouldnt be there.

LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
 

Then you need to ensure your formatting for that field removes any time portion.

Also, dont rely on the DB to do the date validation, do it before you try storing the data


Hi,
LizR if you can provide me some code on how to extract values in different dropdownlist n then rebind it a database field I'll be greatful since all my attempts give me some eroor or the other.
thanks
shraddha

shraddha24
Newbie Poster
7 posts since Dec 2008
Reputation Points: 10
Solved Threads: 0
 
DOB shouldnt matter if someones capable of doing a job they are capable however, I dont see why it shouldnt be there.


Hi,
LizR should I remove D.O.B field from my website is it really unnecessary?
thanks
shraddha

shraddha24
Newbie Poster
7 posts since Dec 2008
Reputation Points: 10
Solved Threads: 0
 

I wouldnt say unnecessary as certainly where I am, we have to give date of birth, and marital status - arguably this has no relevance to any job you may or may not apply for though.

LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
 

Hi,
Can you provide me some programming help on entering dates via dropdownlist?
thanks in advance
shraddha

shraddha24
Newbie Poster
7 posts since Dec 2008
Reputation Points: 10
Solved Threads: 0
 

I thought we already went through that at the beginning of the thread.

LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
 
Date of birth on a job portal? Are you mad?
DOB shouldnt matter if someones capable of doing a job they are capable however, I dont see why it shouldnt be there.
should I remove D.O.B field from my website is it really unnecessary?

Rashkil is right. In fact, in many countries (most of the EU in fact) its illegal for employers to select candidates based on age. So long as they are old enough to legally do the job then they are not allowed to discriminate.

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,826
Solved Threads: 601
 

However, depending on the job, there are some age restrictions such as you cant have a 17yr old truck driver they have to be over 21 I believe, however, as long as it is more for identification rather than discrimination I dont see an issue with it being there

LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
 

Yeah thats why i said "So long as they are old enough to legally do the job". You gotta be 18 to work in a pub, for example.

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,826
Solved Threads: 601
 

Hi, I have done it and now it's working!. But now I have a different problem I want to insert -1 corresponding to not set values in the states and country tables. But my problem is how to insert -1 corresponding to identity column. Can anyone help me out?
thanks
shraddha

shraddha24
Newbie Poster
7 posts since Dec 2008
Reputation Points: 10
Solved Threads: 0
 

New problem, new thread.

LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You