Friday , June 21 2024

How To Convert Gregorian Date to Hijri Date or Hijri Date to Gregorian Date

A friend ask to me to conversion about gregorian date to hijri date or hijri date to gregorian date. I will explan this conversions in this article.

First create a table with datetime datatype and insert a record on it.

Convert Gregorian Date to Hijri Date:

Convert Hijri Date to Gregorian Date:


About dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.


  1. Hi, why the code is not working with me! can you update the code after testing it by latest version?

Leave a Reply

Your email address will not be published. Required fields are marked *