Search code examples
dateexcelhijrivba

Convert Excel date from date serial number to Hijri date


I have a large report data, 30k+ rows in Excel, their are two values which have dates, the dates are in Hijri, 80% of the dates is correct, but a few values appear in date serial number, which is 40383 instead of 1432/8/12, is there any way to convert those back to date, with this format, (yyyy/mm/dd) because I have written another function to calculate dates, and overlapping values, ...


Solution

  • Selection.NumberFormat = "[$-1170000]B2yyyy/mm/dd;@"