Skip to content

Instantly share code, notes, and snippets.

@Omid-M22
Last active February 13, 2022 21:41
Show Gist options
  • Save Omid-M22/604e4fcd37c56ab75518d46ee1f44d07 to your computer and use it in GitHub Desktop.
Save Omid-M22/604e4fcd37c56ab75518d46ee1f44d07 to your computer and use it in GitHub Desktop.
Extraction of month name in Hijri dates by Excel Lambda function
Month_of_Hijri_Date=LAMBDA([Hijri date],
SWITCH(
--MID(
[Hijri date],
FIND("/", [Hijri date]) + 1,
FIND("/", [Hijri date], FIND("/", [Hijri date]) + 1) - FIND("/", [Hijri date]) - 1
),
1,"فروردین",
2,"اردیبهشت",
3,"خرداد",
4,"تیر",
5,"مرداد",
6,"شهریور",
7,"مهر",
8,"آبان",
9,"آذر",
10,"دی",
11,"بهمن",
12,"اسفند"
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment