One Of The Main Iranian User Needs Excel, Convert To Solar Gregorian Date Without Complexity And Disassemble Excel File.
Gregorian Date, Excel Supports This Feature From The 2016 Version.
Many of us use Excel for many hours a day. Still, one of the biggest problems with this program, Iranian users are turning to solar Gregorian date, and the date of the limited and sometimes complicated to solve this problem have been proposed, each of which has its own problems; But Microsoft finally officially solved this problem with the 2016 version of Excel so that users can easily convert the Gregorian date to solar.
Convert Gregorian date to solar date in Excel through settings
To get started, open the file and select the dates you want to convert to AD. After selecting the desired dates, right-click and select Format Cells.
The following page is now displayed for you. On this page, select the Date option from the Number tab, and then select the (Persian (Iran) option from the Locale (Location) section, as shown below:
After selecting the date format type, click OK to apply the result.
Convert Gregorian date to solar date in Excel via code
If you decide to select the format and order of the solar date as “day/month/year,” after selecting the desired cell or cells, right-click and select Format Cells.
Now in the page that opens, from the Number tab, select the Date option and then Custom, and in the Type box, replace the General text with the following code, and finally, OK.
[$ -fa-IR, 16] dd / mm / yyyy; @
A significant point to note is that the nature of numbers does not change. In fact, with these methods, the original nature of numbers, which is in the form of AD, is preserved, and you are only dealing with the solar date in appearance.
Note that the mentioned methods are only supported in the 2016 version and later, and if you use the older versions, you will encounter an error.