Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateTime alternating between UK and US formats

Status
Not open for further replies.

Lucas68

Programmer
May 9, 2001
14
BR
I have an app. that saves some info(Date, Time, Browser Type and IP address) to a text file everytime a banner is clicked.
My problem is that the Date and Time keep going back and forth between US and UK formats.
Any thoughts?
Here's the page that handles the clicks:

<%
CountClick = Request(&quot;Id&quot;)
RedirectTo = Request(&quot;Url&quot;)
ClicksNow = Request(&quot;CCT&quot;)
CID = Request(&quot;5779&quot;)
NewClicksNow = ClicksNow + 1
If CountClick = &quot;&quot; OR RedirectTo = &quot;&quot; OR ClicksNow = &quot;&quot; OR CID = &quot;&quot; Then
Response.Redirect(&quot;404Error.asp&quot;)
Else
Set MyConn=Server.CreateObject(&quot;ADODB.Connection&quot;)
MyConn.Open &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\..\xxx.mdb&quot;
Set RS=Server.CreateObject(&quot;ADODB.RecordSet&quot;)
SQL = vbNullString
SQL = SQL & &quot;UPDATE Clients &quot;
SQL = SQL & &quot;SET ClicksNow=&quot;&NewClicksNow&&quot; WHERE ID=&quot;&CountClick&&quot;&quot;
MyConn.execute(SQL)
MyConn.Close
Set MyConn = Nothing
strT = Time()
strT = replace(strT,&quot;,&quot;,&quot;&quot;)
strT = replace(strT,Chr(10),&quot;&quot;,1,-1,0)
strT = replace(strT,Chr(13),&quot;&quot;,1,-1,0)
strD = Date()
strD = replace(strD,&quot;,&quot;,&quot;&quot;)
strD = replace(strD,Chr(10),&quot;&quot;,1,-1,0)
strD = replace(strD,Chr(13),&quot;&quot;,1,-1,0)
strRA = Request.ServerVariables(&quot;REMOTE_ADDR&quot;)
strRA = replace(strRA,&quot;,&quot;,&quot;&quot;)
strRA = replace(strRA,Chr(10),&quot;&quot;,1,-1,0)
strRA = replace(strRA,Chr(13),&quot;&quot;,1,-1,0)
strUA = Request.ServerVariables(&quot;HTTP_USER_AGENT&quot;)
strUA = replace(strUA,&quot;,&quot;,&quot;&quot;)
strUA = replace(strUA,Chr(10),&quot;&quot;,1,-1,0)
strUA = replace(strUA,Chr(13),&quot;&quot;,1,-1,0)
fname = server.mappath(CID + &quot;.txt&quot;)
Set objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)
Set objText = objFSO.OpenTextFile(fname, 8, true)
objText.Write(strT + &quot;,&quot; + strD + &quot;,&quot; + strRA + &quot;,&quot; + strUA) & VBcrlf
objText.Close
Response.Redirect (RedirectTo)
End If
%>


Thank you,
Lucas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top