Convert Gregorian to Hijri Date

Last post 07-01-2009 9:31 AM by ferozkhan. 4 replies.

Sort Posts:

  • Convert Gregorian to Hijri Date

    07-01-2009, 7:46 AM
    • Member
      26 point Member
    • ferozkhan
    • Member since 09-15-2006, 5:48 AM
    • Posts 64

     Hi all,

    how do i convert the current gregorian date into hijri date in vb.net.

     

    thanks

    fairozkhan

  • Re: Convert Gregorian to Hijri Date

    07-01-2009, 8:20 AM
    • Contributor
      2,367 point Contributor
    • akhhttar
    • Member since 02-14-2007, 8:17 AM
    • Pakistan - Lahore
    • Posts 352

    A.A Fairoz,

    Please see the Gregorian to hijri date convertion logic at  http://forums.asp.net/p/1257891/2367152.aspx#2367152

    Thanks

    Muhammad Akhtar Shiekh

    Lets resolve the problem together.

    Please remember to mark the appropriate replies as answer after your question is solved, thanks

    My Blog
  • Re: Convert Gregorian to Hijri Date

    07-01-2009, 8:24 AM
    Answer

    here you go


    Dim HijriDTF As System.Globalization.DateTimeFormatInfo = New System.Globalization.CultureInfo("ar-JO", False).DateTimeFormat


     HijriDTF.Calendar = New System.Globalization.HijriCalendar


     HijriDTF.ShortDatePattern = "dd/MM/yyyy"


      HijriDTF.MonthDayPattern = "MMMM"


      Me.Label1.Text = DateTime.Now.ToString("d", HijriDTF)

    Plz remember to click "Mark as Answer" if this helped you.

    Abdulla AbdelHaq    MCTS, MCPD

    - My Articles on ASP Alliance
    - My Weblogs
    - My Sessions on JorDev User Group

    "Experience is simply the name we give our mistakes"
  • Re: Convert Gregorian to Hijri Date

    07-01-2009, 9:30 AM
    • Member
      26 point Member
    • ferozkhan
    • Member since 09-15-2006, 5:48 AM
    • Posts 64

    WKAS  Muhammad Akhtar Shiekh

    thanks for ur quick reply, but isnt there a simple implementation of the dates.

     

    thanks

    fairozkhan

  • Re: Convert Gregorian to Hijri Date

    07-01-2009, 9:31 AM
    • Member
      26 point Member
    • ferozkhan
    • Member since 09-15-2006, 5:48 AM
    • Posts 64

     thanks abdulla

    ur code snippet solved my problem.

Page 1 of 1 (5 items)