reading date of computer's visitor

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • getafif
    New Member
    • Apr 2018
    • 1

    reading date of computer's visitor

    I have this codage for my horoscope page, now showing date of server not of computer visitor anyone can help me please????

    Public Function DateToText(Para mDate)

    dim Day_ParamDate
    dim Mon_ParamDate
    dim Month_ParamDate
    dim Year_ParamDate

    Day_ParamDate = CInt(Day(ParamD ate))
    Mon_ParamDate = CInt(Month(Para mDate))
    Year_ParamDate = CInt(Year(Param Date))
    If Day_ParamDate < 10 Then
    Day_ParamDate = "0" & CStr(Day_ParamD ate)
    End If
    If Mon_ParamDate < 10 Then
    Mon_ParamDate = "0" & CStr(Mon_ParamD ate)
    End If
    DateToText = Day_ParamDate &"/"& Mon_ParamDate &"/"& Year_ParamDate

    End Function
    <%
    dim horoDay
    dim horoDay_str
    dim horoMonth
    dim horoYear
    dim horodate
    dim horolang
    dim horosign
    dim horodetails

    'horodate = CStr(FormatDate (Request.QueryS tring("horodate "), "d-M-Y"))
    horodate = CStr(Request.Qu eryString("horo date"))
    horoDay = CInt(Left(horod ate,2))
    horoMonth = CInt(Mid(horoda te,4,2))
    horoYear = CInt(Right(horo date,4))
    if horoDay < 10 then
    horoDay_str = "0" & CStr(horoDay)
    else
    horoDay_str = CStr(horoDay)
    end if
    horodate = horoDay_str & "-" & left(UCASE(Mont hName(horoMonth )),3) & "-" & CStr(horoYear)
    horolang = CInt(Request.Qu eryString("horo lang"))
    horosign = CInt(Request.Qu eryString("horo sign"))

    Dim objConn
    Set objConn = Server.CreateOb ject("ADODB.Con nection")
    objConn.Open session("mySess ionDB")
    Set rs = Server.CreateOb ject("ADODB.Rec ordset")

    sqlQuery = "Select * From Horo Where Horo_Date = '" &horodate& "' And Horo_Lang = " &horolang& " And Horo_Sign = " &horosign
    rs.Open sqlQuery, objConn, 1, 2
    if not (rs.EOF And rs.BOF) then
    horodetails = rs("Horo_Detail s")
    else
    horodetails = "N/A"
    end if
    rs.Close
    %>
    <a href="horo_sign .asp?horodate=< %=DateToText(no w())%>&horolang =2&horosign=5" >
    this code must read date of computer visitor for now
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    Almost always* the date on the computer of the visitor is the same as on your computer.

    *) It should be accurate enough to display a horoscope....

    Comment

    Working...