Results 1 to 3 of 3

Thread: How to Convert a Gregorian date to Hijri format

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Location
    jeddah
    Posts
    9

    Question How to Convert a Gregorian date to Hijri format

    first of all in vb Access i can convert the date formate as i want . but in .NET
    How to Convert a Gregorian date to Hijri format
    thanks for all

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    In Access 2002, there is an option to use Hijri Calendar, you can find it in tools, options, international.

  3. #3
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    First:
    I am sorry for previous response, I thought you said you CANT use Hijri calendar in access

    Then:
    use the following code to change from georgian date to Hijri

    Code:
            Dim hj As New CultureInfo("ar-SA")
            Dim hjyr, hjmo, hjday As Integer, gdate As DateTime
            gdate = #11/11/2002# 'or any other date
            hj.DateTimeFormat.Calendar = New HijriCalendar()
            hjyr = hj.DateTimeFormat.Calendar.GetYear(gdate)
            hjmo = hj.DateTimeFormat.Calendar.GetMonth(gdate)
            hjday = hj.DateTimeFormat.Calendar.GetDayOfMonth(gdate)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width