atahir
15th August 2002, 12:14
Dear all

we have a problem related to conversion of BaaN Gregorian calander dates to other calander dates e.g. Hijri Calander

Let me explain about Hijri calander. The calander is based on moon months, and every month can have values of 29, 30 days.

We wanted to convert dates between these 2 calanders (ie. Gregorian and Hijri). We have developed a logic which is working fine.

The only problem left is about the 2nd month of any year, as I mentioned earlier, 2nd month in Hijri can be of 29, or 30 days, therfore we have to maintain it like "30-02-1423" But problem here is BaaN does not allow inserting 2nd month dates as "30-02-1423".

If somebody have any idea, How to override this check or BaaN or any other suggestion?

thanks in advance

atahir

muheeb
15th August 2002, 16:15
Hi,

Can you explain to me what logic you implemented?

I mean the basic lines of this logic? functions? liberaries?

atahir
17th August 2002, 15:05
Hi

we have one table having 2 text fields, one field of this table has gregorian dates (in text format) and the other field has corresponding Hijri field. Now we want to insert the Hijri dates in another table having in date format. the error comes when month is 2nd and days are 30, 29

thanks

shah_bs
17th August 2002, 19:43
Well, obviously, you cannot use DATE datatype to store your date.

The solution to me seems to be that everywhere that you need to store a date, you have to store TWO dates, one in the usual BAAN DATE datatype and another in a datatype suitable to represent the Hijri date (for example, LONG (tcmcs.long)).


Hope this helps.

lsatenstein
18th August 2002, 03:37
Hi Athir

Your Calendar is a lunar one, similar to that used by the Jews, chineese and other people who follow the lunar calendar.

If I am correct, your calendar repeats every 19 years. Every third year there is an extra month, and some months are arbitrarily extended one day so that a holiday would not fall on a weekend day.

If that is so, please approach (www.google.com) a search engine and do the search for the jewish or chineese calendar algorithms. Surely someone has already written something like that.

Good luck and let me know the outcome.

dbinderbr
30th August 2002, 21:19
Hello,

Read this document, maybe it can helps you.