This date format is not available in the admin options. But you can get this option by adding some lines of code to inc_funcions.asp and admin_config_datetime.asp:
inc_functions.asp
In function chkDateTime(fDateTime) (around line 558), add the code marked in red:
function chkDateTime(fDateTime)
if fDateTime = "" then
exit function
end if
if IsDate(fDateTime) then
select case strDateType
'*** added code for date format 31.12.2000 (DE short)***
case "d.m.y"
ChkDateTime = Mid(fDateTime,7,2) & "." & _
Mid(fDateTime,5,2) & "." & _
Mid(fDateTime,1,4)
'******* end added code ********************************
case "dmy"
chkDateTime = Mid(fDateTime,7,2) & "/" & _
Mid(fDateTime,5,2) & "/" & _
Mid(fDateTime,1,4)
'....
The same procedure for function chkDate(fDate) (around line 745):
function chkDate(fDate)
if fDate = "" then
exit function
end if
' if IsDate(fDate) then
select case strDateType
'*** added code for date format 31.12.2000 (DE short)***
case "d.m.y"
ChkDate = Mid(fDate,7,2) & "." & _
Mid(fDate,5,2) & "." & _
Mid(fDate,1,4)
'******* end added code ********************************
case "dmy"
chkDate = Mid(fDate,7,2) & "/" & _
Mid(fDate,5,2) & "/" & _
Mid(fDate,1,4)
'....
admin_config_datetime.asp
around line 165
<select name="strDateType">
<option Value="mdy"<% if (lcase(strDateType)="mdy") then Response.Write(" selected") %>>12/31/2000 (US short)</option>
<option Value="dmy"<% if (lcase(strDateType)="dmy") then Response.Write(" selected") %>>31/12/2000 (UK short)</option>
<!-- added code for date format 31.12.2000 (DE short) -->
<option Value="d.m.y"<% if (lcase(strDateType)="d.m.y") then Response.Write(" selected") %>>31.12.2000 (DE short)</option>
<!-- end added code --------------------------------- -->
<option Value="ymd"<% if (lcase(strDateType)="ymd") then Response.Write(" selected") %>>2000/12/31 (Other short)</option>
Then login as admin, go to admin section - server date time config and choose "31.12.2000 (DE short)".
I'm using this code for quite a while for my german forum version as this is the common german date format. That's why I call it DE short but of course you can rename it to anything you want
Barbara
(updated 16 May 02)
This code works for the current standard snitz forum version 3.3.03 and also for v.4 beta. (I've been running it also with 3.1 SR4). However, if you use davio's modded forum version (with anonymous access etc., http://dsilvera.com/download.asp?mod=anonymous_access&ver=full) you will have to do one more change in inc_function.asp (line 120):
function ReadGuestLastHereDate()
dim tempGuestLastVisit
if not isDate(strForumTimeAdjust) then
strForumTimeAdjust = strToDate(strForumTimeAdjust)
end if
'*** CHANGED for date format 31.12.2000 (DE short) ****************
tempGuestLastVisit = StrToDate(Request.Cookies(strCookieURL & "LastVisitDate"))
'tempGuestLastVisit = chkDate(Request.Cookies(strCookieURL & "LastVisitDate")) &_
chkTime(Request.Cookies(strCookieURL & "LastVisitDate"))
'*** END CHANGED **************************************************
...
Edited by - _barbara on 16 May 2002 13:15:50