Islamic calendar Convert / Change Date Format to Normal Calendar format

Hi;

How can I convert the date information according to Saudi arabia calendar to normal calendar.

Do you want convert from Gregorian to Islamic date or only change format?

Hi; Yes. Islamic format convert Gregorian format

are your hijri dates using the umm al-qura chronology or a different leap year pattern?

1 Like

Hi; As in this example, I want to convert the format of dates to a Gregorian calendar.


yes - but the hijri calendar system has at least 3 (probably more) leap year patterns - the 15 & 16 based, and the “Indian”… which one do you want to use? (Ah, there are apparently 4)

1 Like

I am not sure. But India is not an option, Base_15 or Base_16 is probably but to confirm that Armin can offer us an opinion on this. Saudi Arabia

@armingrudd Hi; We are not sure about calendar conversion which method will give the correct result, I would be glad if you help.

1 Like

You could do this conversion using a Java Snippet node and the Joda Time libraries; if your unsure of how you would go about doing that, if you can provide me with a simple workflow containing the data that’s in the that table, i could provide it for you.

1 Like

KNIME_Saudi Arabia_monafasat.etimad.sa_project.knwf (34.9 KB)

You’ll need to download the jar from here, and specify where it is in the “Additional Libraries” tab of the Java Snippet node… otherwise this should work out of the box for you.

This workflow is large because it contains the data.
islamic date conversion.knwf (2.1 MB)

If your date column format changes, or you need to use a different leap year pattern, look at the code in the Java Snippet panel - i put comments in it as to where these are defined.

4 Likes

Hi @umutcankurt,

I think you can also use this API.

Here is your workflow with converted dates (“open”) using the mentioned API:

KNIME_Saudi Arabia_monafasat.etimad.sa_project.knwf (49.7 KB)

:blush:

5 Likes

Many thanks for the solution. :+1: :knime:

1 Like

Hi Armin; Thanks for the answer and for the Solution. :wink: :+1:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.