-1

Like this example but Reverse, I need to convert the Jalali date to Gregorian date by a function.

Ali Alavi
  • 1
  • 1

1 Answers1

0

By modifying the other answer, you just need to reverse the position of the table. then look the jalali date in the 1st column. Note that you have to format your date using custom format since it will look like a number by default (See column D).

Formula:

  • =ARRAYFORMULA(IFERROR(VLOOKUP(E1:E3, {REGEXREPLACE(REGEXREPLACE(REGEXEXTRACT(QUERY(IMPORTXML( "https://calendar.zoznam.sk/persian_calendar-en.php?ly="&YEAR(TODAY()), "//tr"), "select Col2 where Col2 is not null"), ": (.+)"), " ", ", "), "\., ", " "), ROW(INDIRECT( DATEVALUE("01/01/"&YEAR(TODAY()))&":"& DATEVALUE("12/31/"&YEAR(TODAY()))))}, 2, 0)))

Formatted date (Column F):

output

NightEye
  • 10,634
  • 2
  • 5
  • 24
  • Thanks for your response... This is a good function, but I have two problems with it: 1. This function only works for this year (which I think is not difficult to modify) 2. Only the defined format can give input to it (Column D) In the link as my first post, there is a second answer that has created a custom function with Java that makes the way easier. I'm very interested in that way my problem is solved. Thanks for your time – Ali Alavi Jun 05 '21 at 14:51