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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Date Format (solar Calendar) to Lunar Calendar

Status
Not open for further replies.

adac4u

Instructor
Sep 21, 2001
2
US
Need help here ...
I have the table Guess with a column DOB using date format.
How can I convert to Chinese Lunar Calendar so I can get his Chinese Zodiac ?

Thank you very much

ADAC4U
 
As I understand it, the Chinese calendar works by rotating through a fixed series of 12 animals.
Each year (2001, 2002) relates to one animal, so anyone born 1 Jan 2001 would be the same animal as someone born 31 Dec 2001.

If the above is true then simply dividing the year by 12 and counting the remainder will work.

mod(2004, 12); = 0 as does mod(1992, 12); (Monkey?)
mod(2003, 12); = 1 as does mod(1991, 12); (Sheep?)

The coding is good, even if my knowledge of the Chinese calendar isn't.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top