Re: Date data type in MySQL

2005-06-06 Thread mohsen ali momeni
 Hi,
 
 I was wondering how Date data type is dealt with in such databases
 as PostgreSQL or mySQL?
 
 Databases usually have Date related operations such as equality,
 less than, greater than, etc . But most databases have the Gregorian
 Calendar and not Jalalian.
 
 Any solutions or hacks?

Jalali calender is not implemented in MySQL yet. But MySQL doesn't
check the validity of Date entered. I mean you can enter any date
having day part from 1 to 31. So Jalali Date can be saved in Date data
type of MySQL. Also operations such as equality or .. works fine with
it. The only problem is the Add_Date, Sub_Date and functions like that
which doesn't work for Persian Date. A Multi-Calender system for MySQL
is going to be developed in near future (probably by me) so if you
need the full functionality, you should wait till then.

Regards,

-- 
__ \ /_\\_-//_ Mohsen A. Momeni
 __\ _ /_ www.momeni.us.tc

___
PersianComputing mailing list
PersianComputing@lists.sharif.edu
http://lists.sharif.edu/mailman/listinfo/persiancomputing


Re: Date data type in MySQL

2005-06-06 Thread Medi Montaseri
Thanks Mohsen...On 6/5/05, mohsen ali momeni [EMAIL PROTECTED] wrote:
 Hi, I was wondering how Date data type is dealt with in such databases as PostgreSQL or mySQL? Databases usually have Date related operations such as equality, less than, greater than, etc . But most databases have the Gregorian
 Calendar and not Jalalian. Any solutions or hacks?Jalali calender is not implemented in MySQL yet. But MySQL doesn'tcheck the validity of Date entered. I mean you can enter any date
having day part from 1 to 31. So Jalali Date can be saved in Date datatype of MySQL. Also operations such as equality or .. works fine withit. The only problem is the Add_Date, Sub_Date and functions like that
which doesn't work for Persian Date. A Multi-Calender system for MySQLis going to be developed in near future (probably by me) so if youneed the full functionality, you should wait till then.Regards,
--__ \ /_\\_-//_ Mohsen A. Momeni __\ _ /_ www.momeni.us.tc___PersianComputing mailing list
PersianComputing@lists.sharif.eduhttp://lists.sharif.edu/mailman/listinfo/persiancomputing
___
PersianComputing mailing list
PersianComputing@lists.sharif.edu
http://lists.sharif.edu/mailman/listinfo/persiancomputing