Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8144191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:18:41+00:00 2026-06-06T13:18:41+00:00

How can I convert Persian date to Gregorian date using System.globalization.PersianCalendar? Please note that

  • 0

How can I convert Persian date to Gregorian date using System.globalization.PersianCalendar?
Please note that I want to convert my Persian Date (e.g. today is 1391/04/07) and get the Gregorian Date result which will be 06/27/2012 in this case.
I’m counting seconds for an answer …

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T13:18:42+00:00Added an answer on June 6, 2026 at 1:18 pm

    It’s pretty simple actually:

    // I'm assuming that 1391 is the year, 4 is the month and 7 is the day
    DateTime dt = new DateTime(1391, 4, 7, persianCalendar);
    // Now use DateTime, which is always in the Gregorian calendar
    

    When you call the DateTime constructor and pass in a Calendar, it converts it for you – so dt.Year would be 2012 in this case. If you want to go the other way, you need to construct the appropriate DateTime then use Calendar.GetYear(DateTime) etc.

    Short but complete program:

    using System;
    using System.Globalization;
    
    class Test
    {
        static void Main()
        {
            PersianCalendar pc = new PersianCalendar();
            DateTime dt = new DateTime(1391, 4, 7, pc);
            Console.WriteLine(dt.ToString(CultureInfo.InvariantCulture));
        }
    }
    

    That prints 06/27/2012 00:00:00.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

we can convert the dictionary to kw using **kw but if I want kw
I know that you can convert a float into a string using NSString *myString
Tested using chrome Canary I can convert a date to JSON: > (new Date()).toJSON()
You can convert a negative number to positive like this: int myInt = System.Math.Abs(-5);
How i can convert number 20020415 to date 15.04.2002. I am working in Microsoft
is there anyway that I can convert a png to a bmp in C#?
On Linux you can convert a date like 2010-10-02 to a unix timestamp in
In Specman I can convert a variable to a string using either: x.to_string(); or
Can somebody please explain to me how I can convert 2009-10-27 14:36:59.580250 into 27.10.2009,
I can convert an integer into string using String s = + 4; //

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.