Part of date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a personalsystem where the field "personal.ID" hav a size of 11 numb.
The first 6 number is the employees birthsday and the last 5 is the unic
number for that person.
What I like to do is to make an query where I can find only those persons
who have an birthday like for instence 30, 40 or 50 year this year.

The date for the file "personal.ID" is starting with dd.mm.yy followed by
the sign - and the last 5 numbers.
Could someone help me with this.

Thanks from Per
 
Per,

What you are doing is possible; however, your description is confusing.

First off there is no such data type and 11 numb. Even if there were you
couldn't have the periods and dash that you describe below stored in that
field. That leaves me to believe that the field is a number, probably a Long
Integer, that is formatted to look as you describe OR a text field.

If a text field, your description still doesn't add up.
dd.mm.yy followed by the sign - and the last 5 numbers.

In that case my data would look like below which is more than 11 characters.
07.06.54-12345

So is this a number field that is formatted to look like above; a text field
that holds more than 11 characters; a text field formatted like above; or
something completely different.

To help you we need to know exactly how the data is stored, not formatted,
but stored, inside the table.
 
Hello and thanks for a quickly answer.
My english is not as good as it shoul be, but.

As you belive the field in the table is a text field with 12 characters and
your example;
07.06.54-12345 is just how it look like.

In the table the inputmask is like this: ######\-#####

Is this information helping you ?

Per
 
SELECT 100+Right(Year(Date()),2)-Mid([id],7,2) AS Age, personal.*
FROM personal
WHERE 100+Right(Year(Date()),2)-Mid([id],7,2) In (30,40,50);
 
I belive this is a SQL line and I paste it in a query but I'm not sure what
it means.
When I tryed to run it a box ask for id.
Is it possible for you to explain for me the function of this text ?

Per

Jerry Whittle said:
SELECT 100+Right(Year(Date()),2)-Mid([id],7,2) AS Age, personal.*
FROM personal
WHERE 100+Right(Year(Date()),2)-Mid([id],7,2) In (30,40,50);
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

Per said:
Hello and thanks for a quickly answer.
My english is not as good as it shoul be, but.

As you belive the field in the table is a text field with 12 characters and
your example;
07.06.54-12345 is just how it look like.

In the table the inputmask is like this: ######\-#####

Is this information helping you ?

Per
 
Hi,

When I saw personal.ID in your original post, I assumed that the table name
was personal and the field name was ID. If I got this wrong, put in the
proper table and field name in the SQL.
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


Per said:
I belive this is a SQL line and I paste it in a query but I'm not sure what
it means.
When I tryed to run it a box ask for id.
Is it possible for you to explain for me the function of this text ?

Per

Jerry Whittle said:
SELECT 100+Right(Year(Date()),2)-Mid([id],7,2) AS Age, personal.*
FROM personal
WHERE 100+Right(Year(Date()),2)-Mid([id],7,2) In (30,40,50);
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

Per said:
Hello and thanks for a quickly answer.
My english is not as good as it shoul be, but.

As you belive the field in the table is a text field with 12 characters and
your example;
07.06.54-12345 is just how it look like.

In the table the inputmask is like this: ######\-#####

Is this information helping you ?

Per

:

Per,

What you are doing is possible; however, your description is confusing.

First off there is no such data type and 11 numb. Even if there were you
couldn't have the periods and dash that you describe below stored in that
field. That leaves me to believe that the field is a number, probably a Long
Integer, that is formatted to look as you describe OR a text field.

If a text field, your description still doesn't add up.
dd.mm.yy followed by the sign - and the last 5 numbers.

In that case my data would look like below which is more than 11 characters.
07.06.54-12345

So is this a number field that is formatted to look like above; a text field
that holds more than 11 characters; a text field formatted like above; or
something completely different.

To help you we need to know exactly how the data is stored, not formatted,
but stored, inside the table.
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

:

I have a personalsystem where the field "personal.ID" hav a size of 11 numb.
The first 6 number is the employees birthsday and the last 5 is the unic
number for that person.
What I like to do is to make an query where I can find only those persons
who have an birthday like for instence 30, 40 or 50 year this year.

The date for the file "personal.ID" is starting with dd.mm.yy followed by
the sign - and the last 5 numbers.
Could someone help me with this.

Thanks from Per
 
Back
Top