Solved

Intranet Date format US to UK ASP

Posted on 2011-09-11
8
439 Views
Last Modified: 2012-05-12
I have a bit of an issue with a timesheet page on my intranet.
It is based on ASP and VB script using an access database. It worked fine until we moved it to a server 2008 server from 2003 server. Now it seems to convert UK format to US, only at the start of the month when the numbers could go either way.

Generally it reads the number correctly from Access, if the date is correct in access it will show correctly, it only changes when the date is passed from one page to another. For example, one page allows you to choose a date (05/09/11) which is already in the database, it passes this date to the next page which allows you to enter data against that date, but the second page tries to match entries for the date 09/05/11, can't find anything for that date so creates a new sheet for 09/05/11 which is then entered in the database.

The problem is when i choose to enter something on 09/05/11 it now switches it back.

I have a duplicate intranet on my machine (Windows 7) with identical data which works fine but i switch back to the server copy and it reverts.

I have checked the regional settings and they seem to be correct UK, i even added
<% session.LCID="2057"%> to the top of every page, it still doesn't get it

Any Ideas? our IT consultants suggest it's to do with the asp page, but as it was working before the move, and works locally i think it must be a server setting?

The page in question is attached (it actually seems to happen with a couple of other pages on the site as well but this is the most important one). if anyone recognises the coding, one of your expert exchange gurus helped me with it a couple of years ago (carzkiss).
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<% session.LCID="2057"%>
<%'The first thing that we have to do is load our ADOVBS.inc file, this is used in our Parameters, that you will see used below in all the statements that we will be using in this project%>
<!--#include file="ADOVBS.inc"-->
<%
Set objConn = CreateObject("ADODB.Connection")
objConn.ConnectionString = "provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & _
Server.MapPath ("ProMan.accdb") & ";"
objConn.Open

Set sqlProj = CreateObject("ADODB.Command") ' 
sqlProj.ActiveConnection=objConn
sqlProj.Prepared = true
sqlProj.commandtext = "SELECT JNo, PDName FROM qry_ProjCurList ORDER BY JNo Desc"
set rsProj = sqlProj.execute
%>
<%
Set objConn = CreateObject("ADODB.Connection")
objConn.ConnectionString = "provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & _
Server.MapPath ("TimeSheets.accdb") & ";"
objConn.Open
 
' This code is being designed to cross-platform
' This code will work with both: ACCESS Database & SQL Server
' If your company ever decided to merge to SQL Server, the only that that will need to be changed is the Connection String.
 
' time to get the QueryString variables to use in our SELECT STATEMENTS!
getWeek = trim(Request.QueryString("WeekCh"))
getUser = trim(Request.QueryString("UserNameCH"))
 
Set sqltime = CreateObject("ADODB.Command") ' 
sqltime.ActiveConnection=objConn
sqltime.Prepared = true
sqltime.commandtext = "SELECT tID, tWeekBegin, tEmployeeNum, tProjNum, tStage, tTask, tMon, tTues, tWed, tThurs, tFri, tSat, tSun FROM tbl_TimeLog where tWeekBegin =? and tEmployeeNum=?"
sqltime.Parameters.Append sqltime.CreateParameter("@tWeekBegin", adDate,adParamInput, , getWeek)
sqltime.Parameters.Append sqltime.CreateParameter("@tEmployeeNum", adVarChar,adParamInput, 255, getUser)
set rsTime = sqltime.execute

Set sqlStage = CreateObject("ADODB.Command") ' 
sqlStage.ActiveConnection=objConn
sqlStage.Prepared = true
sqlStage.commandtext = "SELECT tStage FROM tbl_Stages"
set rsStage = sqlStage.execute

Set sqlTask = CreateObject("ADODB.Command") ' 
sqlTask.ActiveConnection=objConn
sqlTask.Prepared = true
sqlTask.commandtext = "SELECT tTask FROM tbl_Tasks"
set rsTask = sqlTask.execute
 
Set sqlTotal = CreateObject("ADODB.Command") ' 
sqlTotal.ActiveConnection=objConn
sqlTotal.Prepared = true
sqlTotal.commandtext = "SELECT Count(tID), Count(tWeekBegin), Sum(tMon), Sum(tTues), Sum(tWed),Sum(tThurs), Sum(tFri), Sum(tSat), Sum(tSun)  FROM tbl_TimeLog  WHERE tWeekBegin = ? AND tEmployeeNum =?"
sqlTotal.Parameters.Append sqlTotal.CreateParameter("@tWeekBegin", adDate,adParamInput, , getWeek)
sqlTotal.Parameters.Append sqlTotal.CreateParameter("@tEmployeeNum", adVarChar,adParamInput, 255, getUser)
set rsTotal = sqlTotal.execute
 
Set sqlPass = CreateObject("ADODB.Command")
sqlPass.ActiveConnection=objConn
sqlPass.Prepared = true
sqlPass.commandtext = "SELECT tWeekBegin FROM tbl_TimeLog WHERE tWeekBegin =?"
sqlPass.Parameters.Append sqlPass.CreateParameter("@tWeekBegin", adDate,adParamInput, , getWeek)
set rsPass = sqlPass.execute
 
 
Set sqlLogin = CreateObject("ADODB.Command")
sqlLogin.ActiveConnection=objConn
sqlLogin.Prepared = true
sqlLogin.commandtext = "SELECT tEmployeeNum, Fname, JobTitle FROM tbl_Login WHERE tEmployeeNum = ?"
sqlLogin.Parameters.Append sqlLogin.CreateParameter("@tEmployeeNum", adVarChar,adParamInput, 255, getUser)
set rsLogin = sqlLogin.execute

if trim(request.Form("RecordsAdd")="Insert") then ' This lets us ONLY load the INSERT STATEMENT when it is called ONLY! 
getWeek = trim(request.Form("WeekCh")) ' Have to get the Form Values to insert into the table
getUser = trim(request.form("UserNameCh")) ' same as above
set sqlInsert = Server.CreateObject("ADODB.Command")
sqlInsert.ActiveConnection = objConn
sqlInsert.CommandText = "INSERT INTO tbl_TimeLog (tWeekBegin, tEmployeeNum) VALUES (?,?)" ' Use Parameters ONLY here.
sqlInsert.Parameters.Append sqlInsert.CreateParameter("@tWeekBegin", adDate,adParamInput, , getWeek)
sqlInsert.Parameters.Append sqlInsert.CreateParameter("@tEmployeeNum", adVarChar,adParamInput, 255, getUser)
sqlInsert.Execute()
End If 
 
row=CInt(Request.Form("row"))
For n=1 to row
if trim(request.Form("Records")="Update") then ' This lets us ONLY load the UPDATE STATEMENT when it is called ONLY! 
Set sqlUpdate=CreateObject("ADODB.Command")
' we are going to get of the Form variables to use in our Update Statement
multiID = int(request.Form("tID"))
tProjNum = trim(request.Form("tProjNum_" & n))
tStage = trim(request.Form("tStage_" & n))
tTask = trim(request.Form("tTask_" & n))
tMon = CDbl(request.Form("tMon_" & n))
tTues = CDbl(request.Form("tTues_" & n))
tWed = CDbl(request.Form("tWed_" & n))
tThurs = CDbl(request.Form("tThurs_" & n))
tFri = CDbl(request.Form("tFri_" & n))
tSat = CDbl(request.Form("tSat_" & n))
tSun = CDbl(request.Form("tSun_" & n))
tID = int(request.Form("tID_" & n))
sqlUpdate.ActiveConnection=objConn
sqlUpdate.commandtext = "update tbl_TimeLog set "& _
"[tProjNum]=? ,"& _
"[tStage]=? ,"& _
"[tTask]=? ,"& _
"[tMon]=? ,"& _
"[tTues]=? ,"& _
"[tWed]=? ,"& _
"[tThurs]=? ,"& _
"[tFri]=? ,"& _
"[tSat]=? ,"& _
"[tSun]=? where tID=?"
'response.Write"tProjNum - "&tProjNum&" <br />tStage "&tStage&" <br />tTask "&tTask&" <br />tMon "&tMon&" <br />tTues "&tTues&" <br />tWed "&tWed&" <br />tThurs "&tThurs&" <br />tFri "&tFri&" <br />tSat "&tSat&" <br />tSun "&tSun&" <br /> tID"&tID&""
'response.End()
sqlUpdate.Parameters.Append sqlUpdate.CreateParameter("@tProjNum", adVarChar,adParamInput, 255, tProjNum)
sqlUpdate.Parameters.Append sqlUpdate.CreateParameter("@tStage", adVarChar,adParamInput, 255, tStage)
sqlUpdate.Parameters.Append sqlUpdate.CreateParameter("@tTask", adVarChar,adParamInput, 255, tTask)
sqlUpdate.Parameters.Append sqlUpdate.CreateParameter("@tMon", adDouble,adParamInput, , tMon)
sqlUpdate.Parameters.Append sqlUpdate.CreateParameter("@tTues", adDouble,adParamInput, , tTues)
sqlUpdate.Parameters.Append sqlUpdate.CreateParameter("@tWed", adDouble,adParamInput, , tWed)
sqlUpdate.Parameters.Append sqlUpdate.CreateParameter("@tThurs", adDouble,adParamInput, , tThurs)
sqlUpdate.Parameters.Append sqlUpdate.CreateParameter("@tFri", adDouble,adParamInput, , tFri)
sqlUpdate.Parameters.Append sqlUpdate.CreateParameter("@tSat", adDouble,adParamInput, , tSat)
sqlUpdate.Parameters.Append sqlUpdate.CreateParameter("@tSun", adDouble,adParamInput, , tSun)
sqlUpdate.Parameters.Append sqlUpdate.CreateParameter("@tID", adDouble,adParamInput, , tID)
sqlUpdate.Execute
end if
next 

' to read up on the CreateParameter, please navigate here: http://www.aspfree.com/c/a/Database/The-Command-Object/

'items that we are going to be using in this project for getting logged user and dates.

' FirstDate will get the first day of the week to use for the new TimeSheet to start the week off.
FirstDate = (dateadd("d",(2-datepart("w",date())),date()))
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth

Dim MM_removeList
Dim MM_item
Dim MM_nextItem

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
  MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If

MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""

' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
  End If
Next

' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
  End If
Next

' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then 
  MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "")  Then
  MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
  MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HMY Timesheet</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="../HMYWebStyle.css" rel="stylesheet" type="text/css" />
<%'To keep your page clean and tidy, always use CSS to specify your page elements.
  ' Never define the WIDTH attribute in your HTML element unless your dealing with <img> tags.
  ' The WIDTH attribute is longer supported by valid XHTML code. %>
</head>
<body>
<div align="center"><table width="90%" height="50" border="0" cellpadding="5" cellspacing="0" >
    <tr valign="top"> 
      <td width="444" height="40" valign="middle"> <form name="Google" id="GoogleSearch" method="Get" action="http://www.google.co.uk/search">
          <div align="left"> 
            <input type="text"   valign="middle" name="q" height="25" size="40" maxlength="255" value="" />
            <input name=meta type=hidden id=cty value="cr=countryUK|countryGB">
            <input type="submit" valign="middle" value="Google UK Search" />
          </div>
        </form></td>
     <td width="175" height="40" valign="middle"><h4><a href="/External/Technical.asp">Technical 
          Websites</a></h4></td>
      <td width="175" height="40" valign="middle"> <a href="http://hmyweb/Timesheet/TimesheetLogin.asp"><img src="/Images/HMYTime.gif" alt="HMY Timesheet Login" width="174" height="30" border="0" /></a></h5></td>
      <td width="116" height="40" valign="middle"><div align="right"> <a href="http://www.hmy.uk.com" target="_blank"><img src="/Images/HMY-ID.gif" alt="HMY Website" width="116" height="42" border="0" /></a></div></td>
    </tr>
  </table>
  <table width="90%" height="30" border="0" cellpadding="5" cellspacing="0" >
    <tr> 
      <td width="92" height="40"><h5><he><a href="../News.asp">News/</a></he></h5></td>
      <td width="92" height="40"><h5><he><a href="/GenTemplates.asp">Templates/</a></he></h5></td>
      <td width="92" height="40"><h5><he><a href="../EmpHandbook.asp">Employee 
          Information/</a></he></h5></td>
      <td width="92" height="40"><h5><he><a href="../QA.asp">QA 
          Procedures/</a></he></h5></td>
      <td width="92" height="40"><h5><he><a href="../ProjData.asp">Project 
          Database/</a></he></h5></td>
      <td width="92" height="40"><h5><he><a href="../TechGuide.asp">Library/</a></he></h5></td>
      <td width="92" height="40"><h5><he><a href="../training.asp">Training/</a></he></h5></td>
      <td width="92" height="40"><h5><he><a href="../StaffRes.asp">Staff 
          Resources/</a></he></h5></td>
      <td width="92" height="40"><div align="right"> 
          <h5><a href="../ExterLink.asp">Useful 
            Links/</a></h5>
        </div></td>
    </tr>
  </table>
  <p1></p1> 
  <table width="90%" height="50" border="0" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">
    <tr> 
      <td width="92" height="40"><h5><he><a href="/NewsArchive.asp">Archive/</a></he></h5></td>
      <td width="92" height="40"><h5><he>&nbsp;<a href="/Timesheet/TimesheetLogin.asp">Timesheet/</a></he></h5></td>
      <td width="92" height="40"><h5 align="left"><he><a href="/Timesheet/Admin/TimeLogBreak.asp">Project 
          Progress/</a></he></h5></td>
      <td width="92" height="40"><h5><he>&nbsp;</he></h5></td>
      <td width="92" height="40"><h5><he>&nbsp;</he></h5></td>
      <td width="92" height="40"><h5><he>&nbsp;</he></h5></td>
      <td width="92" height="40"><h5><he>&nbsp;</he></h5></td>
      <td width="92" height="40"><h5><he>&nbsp;</he></h5></td>
      <td width="92" height="40"><div align="right"> 
          <h5><a href="/Secure/SecureNews.asp">Login to Edit/</a></h5>
        </div></td>
    </tr>
  </table>
  <p>&nbsp;</p>
  <table width="90%" border="0" cellspacing="0" cellpadding="3">
    <tr> 
      <td><h1 align="left">HMY Timesheet</h1></td>
    </tr>
    <tr> 
      <td><table width="100%" border="0" cellspacing="0" cellpadding="3">
          <tr> 
            <td> <div align="left"> 
                <%'First we need to see if the user is logged into their account.
' Here we need to add in the login credentials, how-ever you may be doing this. Then we will match that against the querystring and then move on to the form submission ONLY if they match. So. this is a demostration of how this will work.
' getUser="Howells"  is the logged in User..
' getWeek = ""&FirstDate&""  This will get the date from the QueryString and match it against the date that is Today!
' This SHOULD ONLY show for the 1st day of the week, it should not show this any other day.
if getUser = trim(Request.QueryString("UserNameCH")) and getWeek = ""&FirstDate&""  then%>
                Please click here to load (Refresh) your: <a href="?WeekCh=<%=trim(request.QueryString("WeekCh"))%>&amp;UserNameCH=<%=trim(request.QueryString("UserNameCH"))%>"><font color="#e56c2b">TimeSheet</font> 
                </a> 
                <%elseif getUser = trim(Request.QueryString("UserNameCH")) then ' This is for everything else.
' if you are using cookies or sessions to keep track of logged users, then you will replace the name with that information.
' if trim(request.QueryString("UserNameCH")=strUsername) then
' where strUsername will be the identifier for the session or cookies that is used to validate the user against the database and against the querystring.
' Now we continue on
%>
                Hello <%=getUser%><br />
              </div></td>
          </tr>
          <tr> 
            <td><form action="Q_24883096.asp?WeekCh=<%=FirstDate%>&amp;UserNameCH=<%=rsLogin("tEmployeeNum")%>" method="post" id="AddRow">
                <div align="left"> 
                  <input name="RecordsAdd" type="hidden" id="RecordsAdd" value ="Insert"  />
                  Please click here to create a 
                  <input name="Submit2" type="submit" id="Submit" value="New Timesheet" />
                  <input name="WeekCh" type="hidden" id="WeekCh" value="<%=FirstDate%>" />
                  <input name="UserNameCh" type="hidden" id="UserNameCh" value="<%=rsLogin("tEmployeeNum")%>" />
                </div>
              </form></td>
          </tr>
          <tr> 
            <td> <div align="left"> 
                <%else ' If the user that is logged in does not match the user above, then we will give them an error.%>
                You are not allowed here, please leave! 
                <%end if%>
                <% If Not rsTime.EOF Or Not rsTime.BOF Then %>
              </div></td>
          </tr>
          <tr> 
            <td><table style="width:100%; border:0px; text-align:center;" cellpadding="5" cellspacing="0">
                <tr> 
                  <td> All Fields must have a Value (Default = 0). Do not use 
                    'Details' section without Partners express permission. 
                    <table width="100%" border="1" cellspacing="0" cellpadding="3">
                      <tr> 
                        <td><form action="Q_24883096.asp?WeekCh=<%=trim(request.QueryString("WeekCh"))%>&amp;UserNameCH=<%=trim(request.QueryString("UserNameCH"))%>" method="post" id="TimeEd">
                            <div style="text-align:center;"> 
                              <table style="border:0px;" cellpadding="5" cellspacing="5">
                                <tr> 
                                  <td colspan="12"> <table style="width:100%; border:0px;" cellspacing="0" cellpadding="3">
                                      <tr> 
                                        <td class="tdHeaderTop"> <input type="hidden" name="Records" value="Update" /> 
                                          <input name="Update" type="submit" id="Update3" value="Update" /></td>
                                        <td class="tdHeaderTop">Week Beginning: 
                                          <input name="WeekCh2" type="text" id="WeekCh5" value="<%=rsTime("tWeekBegin")%>" readonly="readonly" /> 
                                        </td>
                                        <td class="tdHeaderTop">Employee: 
                                          <input name="UserNameCh2" type="text" id="UserNameCh5" value="<%=rsTime("tEmployeeNum")%>" /> 
                                        </td>
                                      </tr>
                                    </table></td>
                                </tr>
                                <tr> 
                                  <td class="tdHeader"><font size="-1">Project 
                                    Number</font></td>
                                  <td class="tdHeader"><font size="-1">Stage</font></td>
                                  <td class="tdHeader"><font size="-1">Task</font></td>
                                  <td class="tdHeader"><font size="-1">Mon</font></td>
                                  <td class="tdHeader"><font size="-1">Tues</font></td>
                                  <td class="tdHeader"><font size="-1">Wed</font></td>
                                  <td class="tdHeader"><font size="-1">Thurs</font></td>
                                  <td class="tdHeader"><font size="-1">Fri</font></td>
                                  <td class="tdHeader"><font size="-1">Sat</font></td>
                                  <td class="tdHeader"><font size="-1">Sun</font></td>
                                  <td class="tdHeader"><font size="-1">Total</font></td>
                                  <td class="tdHeader">&nbsp;</td>
                                </tr>
                                <% 
			row=0 ' Set the value of the Row Count to "0"
			While NOT rsTime.EOF ' Start our loop
			row=row + 1 ' Set the value of the Row Count to "1"%>
                                <tr> 
                                  <td class="tdHeader"><font size="-1"> 
                                    <select name="tProjNum_<%=row%>" id="select" class="smallerText">
                                      <%While (NOT rsProj.EOF)%>
                                      <option value="<%=(rsProj.Fields.Item("JNo").Value)%>" <%If (Not isNull((rsTime.Fields.Item("tProjNum").Value))) Then If (CStr(rsProj.Fields.Item("JNo").Value) = CStr((rsTime.Fields.Item("tProjNum").Value))) Then Response.Write("SELECTED") : Response.Write("")%> ><%=(rsProj.Fields.Item("JNo").Value)%>-<%=(rsProj.Fields.Item("PDName").Value)%></option>
                                      <%rsProj.MoveNext()
				  Wend
				  If (rsProj.CursorType > 0) Then
				  rsProj.MoveFirst
				  Else
				  rsProj.Requery
				  End If
				  %>
                                    </select>
                                    </font></td>
                                  <td class="tdHeader"> <font size="-1"> 
                                    <select name="tStage_<%=row%>" id="select3" class="smallerText">
                                      <%While (NOT rsStage.EOF)%>
                                      <option value="<%=(rsStage.Fields.Item("tStage").Value)%>" <%If (Not isNull((rsTime.Fields.Item("tStage").Value))) Then If (CStr(rsStage.Fields.Item("tStage").Value) = CStr((rsTime.Fields.Item("tStage").Value))) Then Response.Write("SELECTED") : Response.Write("")%> ><%=(rsStage.Fields.Item("tStage").Value)%></option>
                                      <%rsStage.MoveNext()
				  Wend
				  If (rsStage.CursorType > 0) Then
				  rsStage.MoveFirst
				  Else
				  rsStage.Requery
				  End If
				  %>
                                    </select>
                                    </font></td>
                                  <td class="tdHeader"> <font size="-1"> 
                                    <select name="tTask_<%=row%>" id="select4" class="smallerText">
                                      <%While (NOT rsTask.EOF)%>
                                      <option value="<%=(rsTask.Fields.Item("tTask").Value)%>" <%If (Not isNull((rsTime.Fields.Item("tTask").Value))) Then If (CStr(rsTask.Fields.Item("tTask").Value) = CStr((rsTime.Fields.Item("tTask").Value))) Then Response.Write("SELECTED") : Response.Write("")%> ><%=(rsTask.Fields.Item("tTask").Value)%></option>
                                      <%rsTask.MoveNext()
				  Wend
				  If (rsTask.CursorType > 0) Then
				  rsTask.MoveFirst
				  Else
				  rsTask.Requery
				  End If
				  %>
                                    </select>
                                    </font></td>
                                  <td class="tdHeader"> <font size="-1"> 
                                    <input name="tMon_<%=row%>" type="text" id="tMon_<%=row%>3" class="smallerText" value="<%=rsTime("tMon")%>" size="3" />
                                    </font></td>
                                  <td class="tdHeader"> <font size="-1"> 
                                    <input name="tTues_<%=row%>" type="text" id="tTues_<%=row%>3" class="smallerText" value="<%=rsTime("tTues")%>" size="3" />
                                    </font></td>
                                  <td class="tdHeader"> <font size="-1"> 
                                    <input name="tWed_<%=row%>" type="text" id="tWed_<%=row%>3" class="smallerText" value="<%=rsTime("tWed")%>" size="3" />
                                    </font></td>
                                  <td class="tdHeader"> <font size="-1"> 
                                    <input name="tThurs_<%=row%>" type="text" id="tThurs_<%=row%>3" class="smallerText" value="<%=rsTime("tThurs")%>" size="3" />
                                    </font></td>
                                  <td class="tdHeader"> <font size="-1"> 
                                    <input name="tFri_<%=row%>" type="text" id="tFri_<%=row%>3" class="smallerText" value="<%=rsTime("tFri")%>" size="3" />
                                    </font></td>
                                  <td class="tdHeader"> <font size="-1"> 
                                    <input name="tSat_<%=row%>" type="text" id="tSat_<%=row%>3" class="smallerText" value="<%=rsTime("tSat")%>" size="3" />
                                    </font></td>
                                  <td class="tdHeader"> <font size="-1"> 
                                    <input name="tSun_<%=row%>" type="text" id="tSun_<%=row%>3" class="smallerText" value="<%=rsTime("tSun")%>" size="3" />
                                    </font></td>
                                  <td class="tdHeader"> <font size="-1"> 
                                    <%	Dim MyNum
	Mynum =rsTime("tMon")+rsTime("tTues")+rsTime("tWed")+rsTime("tThurs")+rsTime("tFri")+rsTime("tSat")+rsTime("tSun")
	Response.Write(Mynum)
	%>
                                    <input type="hidden" name="tID_<%=row%>" value="<%= rsTime("tID")%>" />
                                    </font></td>
                                  <td class="tdHeader"><font size="-1"><a href="Q_24883096_Details.asp?<%= MM_keepBoth & MM_joinChar(MM_keepBoth) & "tID=" & rsTime.Fields.Item("tID").Value %>" target="_blank"
onClick="var w=window.open(this.href,this.target,'width=500,height=600');
return (w)?false:true">Details</a></font></td>
                                </tr>
                                <%
rsTime.movenext ' Move to then next record
wend
%>
                                <tr> 
                                  <td colspan="2"><font size="-1">&nbsp;</font></td>
                                  <td class="tdHeader" style="text-align:right;"><font size="-1">Total:</font></td>
                                  <td class="tdHeader" style="text-align:center;"><font size="-1"><%=rsTotal("Expr1002")%></font></td>
                                  <td class="tdHeader" style="text-align:center;"><font size="-1"><%=rsTotal("Expr1003")%></font></td>
                                  <td class="tdHeader" style="text-align:center;"><font size="-1"><%=rsTotal("Expr1004")%></font></td>
                                  <td class="tdHeader" style="text-align:center;"><font size="-1"><%=rsTotal("Expr1005")%></font></td>
                                  <td class="tdHeader" style="text-align:center;"><font size="-1"><%=rsTotal("Expr1006")%></font></td>
                                  <td class="tdHeader" style="text-align:center;"><font size="-1"><%=rsTotal("Expr1007")%></font></td>
                                  <td class="tdHeader" style="text-align:center;"><font size="-1"><%=rsTotal("Expr1008")%></font></td>
                                  <td class="tdHeader" style="text-align:center;"> 
                                    <font color="#333333" size="-1"> 
                                    <% 
	Dim MyTotal
	MyTotal = rsTotal("Expr1002")+rsTotal("Expr1003")+rsTotal("Expr1004")+rsTotal("Expr1005")+rsTotal("Expr1006")+rsTotal("Expr1007")+rsTotal("Expr1008")
	Response.Write(MyTotal)
	%>
                                    hrs 
                                    <input type="hidden" name="row" value="<%=row%>" />
                                    <%'this counts the rows that we have in the <form>%>
                                    </font></td>
                                  <td class="tdHeader" style="text-align:center;">&nbsp;</td>
                                </tr>
                              </table>
                            </div>
                          </form></td>
                      </tr>
                    </table>
                    <table style="width:100%; border:0px; text-align:left;" cellspacing="0" cellpadding="3">
                      <tr> 
                        <td> <%'The FORM for Inserting new ROWS%> <form action="Q_24883096.asp?WeekCh=<%=trim(request.QueryString("WeekCh"))%>&amp;UserNameCH=<%=trim(request.QueryString("UserNameCH"))%>" method="post" id="AddRow">
                            <input type="hidden" name="RecordsAdd" value ="Insert"  />
                            <input name="Submit" type="submit" id="Submit" value="Add New Row" />
                            <input name="WeekCh" type="hidden" id="WeekCh" value="<%=rsPass("tWeekBegin")%>" />
                            <input name="UserNameCh" type="hidden" id="UserNameCh" value="<%=rsLogin("tEmployeeNum")%>" />
                          </form>
                          Click button to add new row, then click here to <a href="?WeekCh=<%=trim(request.QueryString("WeekCh"))%>&amp;UserNameCH=<%=trim(request.QueryString("UserNameCH"))%>"><font color="#e56c2b">load 
                          the page</font></a> (DO NOT Double click the button, 
                          it will create Multiple Rows) </td>
                      </tr>
                    </table>
                    <form name="CloseFrm" id="CloseFrm" action="../News.asp">
                      <input name="CloseFrm" type="submit" id="CloseFrm" value="Close" />
                    </form>
                    <p>&nbsp;</p></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
    </tr>
  </table>
  <p>&nbsp;</p>
</div>
<p>&nbsp; </p>

<%
rsProj.Close
Set rsProj = Nothing
%>
<%
rsTime.Close()
Set rsTime = Nothing
%>
<%
rsTotal.Close()
Set rsTotal = Nothing
%>
<%
rsPass.Close()
Set rsPass = Nothing
%>
<%
rsLogin.Close()
Set rsLogin = Nothing
 
objconn.close
set objconn = nothing
%>
<%end if%>
</body>
</html>

Open in new window

0
Comment
Question by:GegH
  • 4
  • 3
8 Comments
 
LVL 5

Expert Comment

by:Didier Vally
ID: 36520824
Try :
<globalization uiCulture="en-gb" culture="en-gb" />

0
 

Author Comment

by:GegH
ID: 36520910
Where do i put this?
0
 
LVL 13

Expert Comment

by:khairil
ID: 36520950
this might be the solution, http://support.microsoft.com/kb/306044
0
 
LVL 13

Expert Comment

by:khairil
ID: 36520953
opps, you have used that...
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 13

Expert Comment

by:khairil
ID: 36520974
Other way to do is to change the region setting of the server, try set the server to use UK time format. You can change the server time format by searching the control panel for "Region" keyword, select form the list "English (United Kingdom)".

Restart the server or IIS if needed.

Another suggestion which not related to this. I saw you are using Access for database, Access have limitation in handling multiuser environment, espeically for web base. It happened to us before, and I do not want it to happen to you too.
0
 

Author Comment

by:GegH
ID: 36521025
All server regional settings have been changed
0
 
LVL 13

Accepted Solution

by:
khairil earned 500 total points
ID: 36521230
Emm.. basically when IIS will use Default user profile when try to retrieve. Since I suspect the server have been setup at the beginning to use EN-US, then the default profile is now set to EN-US.

You can check this from the registry setting, navigate to key below:

HKEY_USERS\.DEFAULT\Control Panel\International

See whether it is set US or OK.

If it is US then you use registry entry below to set the default to UK, feel free to change as you need but remember to backup the original key. Warning! Playing around with registry can be dangerous.

Save code below as en_uk.reg, and double click the file to repalce the registry setting of default user. Then restart the machine, if it is failed or not working as expected then revert back to backup you have made:

Windows Registry Editor Version 5.00

[HKEY_USERS\.DEFAULT\Control Panel\International]
"Locale"="00000809"
"LocaleName"="en-GB"
"s1159"="AM"
"s2359"="PM"
"sCountry"="United Kingdom"
"sCurrency"="£"
"sDate"="/"
"sDecimal"="."
"sGrouping"="3;0"
"sLanguage"="ENG"
"sList"=","
"sLongDate"="dd MMMM yyyy"
"sMonDecimalSep"="."
"sMonGrouping"="3;0"
"sMonThousandSep"=","
"sNativeDigits"="0123456789"
"sNegativeSign"="-"
"sPositiveSign"=""
"sShortDate"="dd/MM/yyyy"
"sThousand"=","
"sTime"=":"
"sTimeFormat"="HH:mm:ss"
"sShortTime"="HH:mm"
"sYearMonth"="MMMM yyyy"
"iCalendarType"="1"
"iCountry"="44"
"iCurrDigits"="2"
"iCurrency"="0"
"iDate"="1"
"iDigits"="2"
"NumShape"="1"
"iFirstDayOfWeek"="0"
"iFirstWeekOfYear"="0"
"iLZero"="1"
"iMeasure"="0"
"iNegCurr"="1"
"iNegNumber"="1"
"iPaperSize"="9"
"iTime"="1"
"iTimePrefix"="0"
"iTLZero"="1"

Open in new window



0
 

Author Closing Comment

by:GegH
ID: 36527436
That did the trick.
It is not something that myself or my consultant had heard of before. The server was obviously set up initially with default settings (US), then an administrator account was setup, restarted, logged in as administrator and only then regional settings were re-set as UK. I'm sure this is the way a lot of IT pros do it.
However, Administrator is then just a user account and the regional settings are set to that user account rather than changing the default settings.
IIS uses the default settings rather than the Administrator user account settings.
All very confusing, because everything looks correct until you check the registry.
Very, Very usefull piece of information this, thankyou so much.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now