1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Display Current Date in Islamic Date Format[VERY URGENT]

Discussion in 'C#' started by SYEDHANIF, May 9, 2006.

  1. #1
    hi

    i am working with ASP i need to display the current date in Islamic Date Format

    Example:

    Today's Current Date: May 9, 2006

    It Should Display in Web Page as: Rabi’ Al-thani 11,1427 Islamic Date Format

    can anybody tell me how to do this is asp page

    looking for u response [VERY URGENT]

    regards
    syed
     
    SYEDHANIF, May 9, 2006 IP
  2. vectorgraphx

    vectorgraphx Guest

    Messages:
    545
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try this (from googling, i have no idea if it works)

    Function ConvertDateString(ByRef StringIn As String, ByRef OldCalendar As Integer, ByVal NewCalendar As Integer, ByRef NewFormat As String) As String
    Dim SavedCal As Integer
    Dim d As Date
    Dim s As String
    SavedCal = Calendar
    Calendar = OldCalendar
    If IsDate(StringIn) Then
    d = CDate(StringIn)
    Calendar = NewCalendar
    s = CStr(d)
    ConvertDateString = Format(s, NewFormat)
    ConvertDateString = s
    Else
    ConvertDateString = ""
    End If
    Calendar = SavedCal
    End Function

    source:

    http://www.dbforums.com/archive/index.php/t-793595.html
     
    vectorgraphx, May 10, 2006 IP
  3. Fravia

    Fravia Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Try this :
    <%
    session.lcid=1025
    Response.Write WeekdayName(Weekday(rstCurrent("Date")))
    session.lcid=2057
    Response.Write " " & day((rstCurrent("Date"))) & " "
    Response.Write ardate(month((rstCurrent("Date"))) ) & " "
    Response.Write (year((rstCurrent("Date"))) ) & " "& " م الموافق "
    session.lcid=1025
    Response.Write FormatDateTime(rstCurrent("Date"), vbLongDate) & " هـ "
    %>
     
    Fravia, May 15, 2006 IP