You must Sign In to post a response.
  • Category: ASP.NET

    Display current date of Iran calendar

    I have created one sample application to display current date from iran calendar in textbox.
    Can anyone please help.
    I set culture of page on page load by using,

    CultureInfo newCulture1 = new CultureInfo("fa-Ir");
    Thread.CurrentThread.CurrentCulture = newCulture1;
  • #763956
    You can try to use TimeZone and try to get the date

    Following are some tips

    TimeZoneTime cstTime1;
    TimeZoneInfo cst = TimeZoneInfo.FindSystemTimeZoneById("Time zone name");
    DateTime time1 = new DateTime(2008, 3, 9, 1, 30, 0);
    cstTime1 = new TimeZoneTime(cst, new DateTimeOffset(time1, cst.GetUtcOffset(time1)));

    By Nathan
    Direction is important than speed

Sign In to post your comments