Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7438217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:31:06+00:00 2026-05-29T10:31:06+00:00

I have a DOB column in a table that is currently in use. See

  • 0

I have a DOB column in a table that is currently in use. See below.

Database DOB column

I want to select just the Year from that DOB and display that on a Listbox (or any appropriate interface on a page). We are not using SPs. So I will probably coding SQL directly from the page or using SQL datasource. Using LINQ is alright if that can be done in it.

So please someone suggests me how this can be done.

Thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:31:07+00:00Added an answer on May 29, 2026 at 10:31 am
    SELECT DISTINCT Year(DateOfBirth) AS Year FROM MyTable ORDER BY Year
    

    By including the DISTINCT keyword you will prevent duplicates in your list and by adding the ORDER BY clause the years will be sorted ascending. You can then bind the result to your listbox.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table that has patient information (name, dob, ssn, etc.) and a
I have a grid where I want to take the text from that cell,
I have a function that accepts wildcard keyword parameters: def func(**kargs): doA doB How
I have three tables like this: Person table: person_id | name | dob --------------------------------
I have a table trigger like below: CREATE OR REPLACE TRIGGER PAT_BUR_DOB_TRG BEFORE UPDATE
I have trouble saving my date field into database using CakePHP. Table column name
I want to export the table which is displayed using display tag on the
I have a column in my database called dob of type datetime. How do
I have a user table that has many columns, it looks roughly like this:
I do not want Auditing or History tracking. I have an application that pulls

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.