Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Current Version (Old)
 last visit date reversed
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

enkabe
Starting Member

26 Posts

Posted - 12 May 2001 :  12:50:07  Show Profile
Hi Jim,

I tried it again. I used the 24 hr time display. Tried all settings now with the 12 hr setting. But, nope, it still reverses the last here date. (at the moment

Quote:

You Last Visited - 05 December 2001 6:53:22 PM

--
Did you change anything else other than you mentioned above?

Namita

Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 12 May 2001 :  14:17:09  Show Profile  Visit gor's Homepage
Huw, enkabe,

The strange thing on this site is that all visible dates are correct, except for the last here date. Things like "member since", "last post" on the members page, and last post on the default.asp and forum.asp page are all correct and they all should be affected the same way if the serversettings had anything to do with this.

One thing I can't see is the last visited date on the members page, is that correct ?


I remember reading a topic a few days ago about modifying the function for the date format ? Can't find it anymore...

Pierre
Join the Snitz WebRing
Go to Top of Page

enkabe
Starting Member

26 Posts

Posted - 12 May 2001 :  15:50:09  Show Profile
Hi Gor,

Yes, I've noticed the thing about the posting dates etc being correct. On active.asp, "Last postings" (hourly, daily etc.) are displayed correct aswell. I've set up a new forum on a diffrent site with the same hosting provider, the same problem occures. Unfortunatly I don't have access to a second provider who supports ASP. Just to exclude the fact that *I* am doing something wrong. ( And Stupid!, something obvious)
Although I'm pretty shure that something is going wrong between the code and the server. On the logout that is. (last visit_here_date).
The ISp that I'm working with is moving the servers to a diffrent location. I'm not shure if they will re-configure the servers aswell.

Once I tried to just copy paste the last posting date in the DB to the lasthere date in the DB. It worked untill I logged out.

So when you log out it is not writing it correctly *in* the DB, it is reading *from* it correctly.

Thanks Gor for your reply.

Namita



Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 12 May 2001 :  17:43:06  Show Profile  Visit HuwR's Homepage
quote:

Huw, enkabe,

The strange thing on this site is that all visible dates are correct, except for the last here date. Things like "member since", "last post" on the members page, and last post on the default.asp and forum.asp page are all correct and they all should be affected the same way if the serversettings had anything to do with this.

One thing I can't see is the last visited date on the members page, is that correct ?


I remember reading a topic a few days ago about modifying the function for the date format ? Can't find it anymore...

Pierre
Join the Snitz WebRing



That was to do with changing the date separator from the defaults of "/" and am not sure wether it is the same problem.

here are the results of some tests I've run

strForumTimeAdjust: 7-5-2001 14:46:35 , 20010507144635
Date in FORUM_MEMBERS : 20010507131106, 5-7-2001 13:11:06
function readlastheredate(): 20010705144635, 7-5-2001 13:11:06
Session(strCookieURL & "last_here_date"): 7-5-2001 14:46:35
function Now(): 7-5-2001 14:46:35 , 20010507144635

Now am I really dim, or am I really dim, this person who I tested is not useing the default "/" either, god what a numskull I am , must have stared at that for hours.


Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 12 May 2001 :  17:45:03  Show Profile  Visit HuwR's Homepage
here is a link to the fix for the seperator issue

http://forum.snitz.com/forum/link.asp?TOPIC_ID=9366

Go to Top of Page

enkabe
Starting Member

26 Posts

Posted - 13 May 2001 :  07:28:52  Show Profile
Huw , Gor,
It is displaying the date correctly. With and without the above given solution.
But then again there is not 13th month.
I'll keep you posted what happens on the 1st of june.
I'll be leaving tomorrow for two weeks.
Later and thanks all,
Namita


Go to Top of Page

enkabe
Starting Member

26 Posts

Posted - 01 June 2001 :  05:07:19  Show Profile
Hi,

It is the first of June and Guess what? ;-(
the forum reads
"You Last Visited - 06 January 2001 11:05:38"

I've changed
'function StrToDate(strDateTime)
' if ChkDateFormat(strDateTime) then
' StrToDate = cdate("" & Mid(strDateTime, 5,2) & "/" & Mid(strDateTime, 7,2) & "/" & Mid(strDateTime, 1,4) & " " & Mid(strDateTime, 9,2) & ":" & Mid(strDateTime, 11,2) & ":" & Mid(strDateTime, 13,2) & "")
' else
' StrToDate = "" & strForumTimeAdjust
' end if
'end function

To

function StrToDate(strDateTime)
if ChkDateFormat(strDateTime) then
StrToDate = cdate("" & Mid(strDateTime, 5,2) & "/" & Mid(strDateTime, 7,2) & "/" & Mid(strDateTime, 1,4) & " " & Mid(strDateTime, 9,2) & ":" & Mid(strDateTime, 11,2) & ":" & Mid(strDateTime, 13,2) & "")
else
tmpDate = DatePart("m",strForumTimeAdjust) & "/" & DatePart("d",strForumTimeAdjust) & "/" & DatePart("yyyy",strForumTimeAdjust) & " " & DatePart("h",strForumTimeAdjust) & ":" & DatePart("n",strForumTimeAdjust) & ":" & DatePart("s",strForumTimeAdjust)
StrToDate = "" & tmpDate
end if
end function

in the Inc_functions.asp file

Any Ideas??

Thanks,

Namita



Go to Top of Page

cran
Starting Member

6 Posts

Posted - 01 June 2001 :  12:22:18  Show Profile  Send cran an ICQ Message
Same problem here... Works fine on my local NT4 box, but not on my ISP's Win 2k box...

Same with/without the function change... I'm using Access 2000 as the db if that makes a difference.

Does anyone have a fix?

Go to Top of Page

cran
Starting Member

6 Posts

Posted - 01 June 2001 :  13:01:51  Show Profile  Send cran an ICQ Message
Sorted:

It's because the date is stored as a string an d gets converted to date, then back and the conversion screws up...

heres a fix... use at own risk!

function ReadLastHereDate(UserName)
dim TempLastHereDate
dim rs_date

'## Forum_SQL
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS."&Strdbntsqlname&" = '" & UserName & "' "


set rs_date = my_conn.Execute (strSql)

if (rs_date.BOF and rs_date.EOF) then
ReadLastHereDate = DatetoStr(DateAdd("d",-10,strForumTimeAdjust))
else
TempLastHereDate = StrToDate(rs_date("M_LASTHEREDATE"))
if TempLastHereDate = "" or IsNull(TempLastHereDate) then
ReadLastHereDate = DatetoStr(DateAdd("d",-10,strForumTimeAdjust))
else
ReadLastHereDate = rs_date("M_LASTHEREDATE")
end if
end if

rs_date.close
set rs_date = nothing

'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_LASTHEREDATE = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS." & strDBNTSQLName & " = '" & UserName & "' "

my_conn.Execute (strSql)

end function


Go to Top of Page

enkabe
Starting Member

26 Posts

Posted - 03 June 2001 :  07:33:17  Show Profile
Cran,

Thanks a million it works !!!

Namita


Go to Top of Page

horhan
Starting Member

20 Posts

Posted - 04 June 2001 :  12:44:41  Show Profile
To which file should I have to make these changes that Cran told?

Go to Top of Page

enkabe
Starting Member

26 Posts

Posted - 04 June 2001 :  13:00:10  Show Profile
inc_functions.asp



Edited by - enkabe on 04 June 2001 13:00:40
Go to Top of Page

horhan
Starting Member

20 Posts

Posted - 04 June 2001 :  13:57:22  Show Profile
I changed the codes as Cran written but it gave me this error message!

----------------------------------
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in query expression 'FORUM_MEMBERS. = 'haluk''.

/inc_functions.asp, line 608

---------------------------------

What can be the reason, please help me just a little it more.

Regards!

Go to Top of Page

geunsie
Starting Member

31 Posts

Posted - 04 June 2001 :  19:47:44  Show Profile
looks like you mis-typed something...look closely at your error message :)

Go to Top of Page

big9erfan
Average Member

540 Posts

Posted - 04 June 2001 :  21:16:29  Show Profile
FORUM_MEMBERS = 'haluk'

You need only the 1 ' not 2 of them and no . after FORUM_MEMBERS



http://www.ugfl.net/forums
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07