Solar hijri date support in database engines core

102 views
Skip to first unread message

Amir Farsi

unread,
Nov 21, 2015, 12:00:07 PM11/21/15
to Persian Computing
Hi there.
One of every Iranian which worked with databases and developed a website or persian desktop application is it:
select * from sampleTable where date between 1385/11/14 and 1394//5/16

or 

Sort and Categories a table via SQL command in query for Persian date.
For example sort of bank account statement by date

It will be implementable when a database engine can understand Persian Date(Solar Hijri) in it's core.
How we can implement it in core of database engines(At least for Open Source Database Engines)?
Like: Postrage SQL and MySQL(I know it's not full open source)

 Also i want ask you if we use NoSQL, can we solve Persian Date problem? How is status of them, like mongoDB?

Can anyone contact to MS SQL server, IBM DB2 or Oracle DB teams about it?

Thanks.

Soroush Rabiei

unread,
Jul 10, 2017, 1:50:26 PM7/10/17
to Persian Computing


On Saturday, November 21, 2015 at 8:30:07 PM UTC+3:30, Amir Farsi wrote:
Hi there.
One of every Iranian which worked with databases and developed a website or persian desktop application is it:
select * from sampleTable where date between 1385/11/14 and 1394//5/16

or 

Sort and Categories a table via SQL command in query for Persian date.
For example sort of bank account statement by date

As far as I know, the date is stored as a Julian Date Number in most database management systems (or milliseconds past epoch in some). Some other systems use a custom binary format of broken-down date representation (7-byte format in Oracle Enterprise for instance). Anyway, JDN has nothing to do with the Solar Hijri, Jalali nor the Gregorian calendar systems. As needed, it will be converted internally to calendar date by the DBMS core (or any plugin). 

The issue of providing human-readable date queries can be easily handled in application logic, or can be provided as a function in most database systems. In case all these solutions fail to fulfil your requirement (which I believe they don't) you may want to implement a plugin for your DBMS.  
 

Can anyone contact to MS SQL server, IBM DB2 or Oracle DB teams about it?


If I'm not much mistaken, the Oracle Enterprise supports Jalali calendar system.

Cheers,
Soroush

Reply all
Reply to author
Forward
0 new messages