On this page, we review how to convert Solar (Shamsi) dates to Gregorian (Miladi) dates and vice versa on the Iran VBA website. This form allows you to easily convert dates between the Solar and Gregorian calendars and obtain accurate information about your Solar or Gregorian date.

Date 27 مهر Year 1404 equals 18 October Year 2025

Features of the Date Conversion Form

With this form, you can:

  1. Convert Solar (Shamsi) dates to Gregorian (Miladi): By entering a Solar date, you will get its exact equivalent in the Gregorian calendar.
  2. Convert Gregorian (Miladi) dates to Solar (Shamsi): By entering a Gregorian date, the conversion result to the Solar date will be displayed.

How to Use the Date Conversion Form

To convert a date, first select the conversion type (e.g., Solar to Gregorian), then enter the desired year, month, and day, and click the convert button. As a result, the equivalent date along with the time difference from today’s date will be displayed.

Examples of Date Conversion

  1. Converting Solar Year to Gregorian Year:
    • If your date is in the first half of the year (from Farvardin to Dey), you can add 621 to the Solar year to get the equivalent Gregorian year.
    • If your date is between Dey and Esfand, adding 622 to the Solar year will yield the equivalent Gregorian year.
  2. Converting Gregorian Year to Solar Year:
    • If the Gregorian date is between March 20 and December 31, subtract 621 from the Gregorian year to get the equivalent Solar year.
    • If the Gregorian date is from January 1 to March 19, subtract 622 from the Gregorian year to achieve a similar result.

🎓 Specialized Tutorials for Date Conversion in VBA and Excel

If you are a VBA developer or need to automate date conversions in your Excel projects, these specialized tutorials from Iran VBA are exactly what you need:

  • 📚 Comprehensive Tutorial: Convert Solar (Shamsi) Dates to Gregorian (Miladi) and Vice Versa in VBA
    A complete and professional module for VBA developers that includes:
    💡 Suitable for: VBA Developers, Access Programmers, creating advanced management systems
    • Precise algorithm for detecting leap years based on the computational astronomical calendar by Moussa Akrami
    • Automatic management of leap years in both Solar and Gregorian calendars
    • Three different output types (Array, Number, String) for greater flexibility
    • Complete validation of input dates and error control
    • Complete and ready-to-use code in Access and Excel with practical examples
    • Instructional video for step-by-step transfer of the module to Excel
  • 📊 Tutorial: Convert Solar and Gregorian Dates and Calculate Date Differences
    A ready-to-use Excel file with 4 powerful functions for end-users:
    💡 Suitable for: Accountants, Financial Managers, Professional Excel Users, Data Analysts
    • Function ivMiladiToShamsi – Converts Gregorian to Solar with 7 different output formats
    • Function ivShamsiToMiladi – Converts Solar to Gregorian, supporting 3 input formats
    • Function ivShamsiDiff – Accurately calculates the difference between two Solar dates in days
    • Function ivDaysFromDate – Converts a number of days into Solar years, months, and days
    • Free download of the Excel file with immediate use capability in projects
    • Support for reverse dates and advanced calculations
    • Complete example tables with ready-to-use formulas

🚀 Why are these tutorials unique?
These tutorials are built on years of practical experience in developing Iranian management systems and are fully optimized for the real needs of Iranian businesses. Whether you want to use date conversion in your VBA code or need a ready-made Excel file, Iran VBA meets your needs.