| Author | 
                
                  Topic   | 
                
              
              
                | 
                 enkabe 
                Starting Member 
                 
                 
                
                26 Posts  | 
                
                  
                    
                      
                       Posted - 12 May 2001 :  12:50:07
                        
                      
  | 
                     
                    
                       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
 
  | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 gor 
                Retired Admin 
                      
                 
                
                Netherlands 
                5511 Posts  | 
                
                  
                    
                      
                       Posted - 12 May 2001 :  14:17:09
                        
                        
                      
  | 
                     
                    
                       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 | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 enkabe 
                Starting Member 
                 
                 
                
                26 Posts  | 
                
                  
                    
                      
                       Posted - 12 May 2001 :  15:50:09
                        
                      
  | 
                     
                    
                       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
 
 
 
  | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 HuwR 
                Forum Admin 
                      
                 
                
                United Kingdom 
                20611 Posts  | 
                
                  
                    
                      
                       Posted - 12 May 2001 :  17:43:06
                        
                        
                      
  | 
                     
                    
                       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.
 
 
  | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 HuwR 
                Forum Admin 
                      
                 
                
                United Kingdom 
                20611 Posts  | 
                
                  
                 | 
              
              
                | 
                 enkabe 
                Starting Member 
                 
                 
                
                26 Posts  | 
                
                  
                    
                      
                       Posted - 13 May 2001 :  07:28:52
                        
                      
  | 
                     
                    
                       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
 
 
  | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 enkabe 
                Starting Member 
                 
                 
                
                26 Posts  | 
                
                  
                    
                      
                       Posted - 01 June 2001 :  05:07:19
                        
                      
  | 
                     
                    
                       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
 
 
 
  | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 cran 
                Starting Member 
                 
                 
                
                6 Posts  | 
                
                  
                    
                      
                       Posted - 01 June 2001 :  12:22:18
                        
                      
  | 
                     
                    
                       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?
 
  | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 cran 
                Starting Member 
                 
                 
                
                6 Posts  | 
                
                  
                    
                      
                       Posted - 01 June 2001 :  13:01:51
                        
                      
  | 
                     
                    
                       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
 
 
  | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 enkabe 
                Starting Member 
                 
                 
                
                26 Posts  | 
                
                  
                    
                      
                       Posted - 03 June 2001 :  07:33:17
                        
                      
  | 
                     
                    
                       Cran,
  Thanks a million it works !!!
  Namita
 
 
  | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 horhan 
                Starting Member 
                 
                 
                
                20 Posts  | 
                
                  
                    
                      
                       Posted - 04 June 2001 :  12:44:41
                        
                      
  | 
                     
                    
                       To which file should I have to make these changes that Cran told?
 
  | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 enkabe 
                Starting Member 
                 
                 
                
                26 Posts  | 
                
                  
                    
                      
                       Posted - 04 June 2001 :  13:00:10
                        
                      
  | 
                     
                    
                       inc_functions.asp
 
 
  Edited by - enkabe on 04 June 2001  13:00:40 | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 horhan 
                Starting Member 
                 
                 
                
                20 Posts  | 
                
                  
                    
                      
                       Posted - 04 June 2001 :  13:57:22
                        
                      
  | 
                     
                    
                       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!
 
  | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 geunsie 
                Starting Member 
                 
                 
                
                31 Posts  | 
                
                  
                    
                      
                       Posted - 04 June 2001 :  19:47:44
                        
                      
  | 
                     
                    
                       looks like you mis-typed something...look closely at your error message :)
 
  | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 big9erfan 
                Average Member 
                    
                 
                
                540 Posts  | 
                
                  
                    
                      
                       Posted - 04 June 2001 :  21:16:29
                        
                      
  | 
                     
                    
                       FORUM_MEMBERS = 'haluk'
  You need only the 1 ' not 2 of them and no . after FORUM_MEMBERS
 
 
  http://www.ugfl.net/forums | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                
                
                  Topic   | 
                  |