You are here: Re: SQL needs AGE function. « PHP SQL « IT news, forums, messages
Re: SQL needs AGE function.

Posted by Skybuck Flying on 01/06/08 08:51

Ok,

I think I have figured out a method to do what I want in Delphi:

(Which might be usefull for any other programming languages as well):

Short story:

Decode the date of now, subtract the age range to get minimum and maximum
decoded birthdays.

Re-encode minimum and maximum birthdates, select birthday range.

Copy of posting:
"
Suppose somebody tells you the following information:

On 6 january 2008 I was exactly 97 years.

The mission is to calculate the date of birth.

This is probably very simple:

Simply subtract 97 from 2008

So his birthdate would be: 6 january 1911

Now given a set of birthdates find the people from age 0 and 97.

Suppose now is 6 january 2009. (Guy is now 98)

Subtract 97 from it.

Maximum range: 6 january 1912.

Scan birthdays from 6 january 1912 to now.

His birthday was at 6 january 1911, so he out of range.

Ok, I think this technique could work,

Just decode now, subtract year range from it, re-encode, use it to select
birthdays.

(Related to previous thread: SQL needs AGE function) ;)
"

Bye,
Skybuck.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация