Improve company productivity with a Business Account.Sign Up


Intranet Date format US to UK ASP

Posted on 2011-09-11
Medium Priority
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).
<% session.LCID="2057"%>
<%'The first thing that we have to do is load our 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=""-->
Set objConn = CreateObject("ADODB.Connection")
objConn.ConnectionString = "provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & _
Server.MapPath ("ProMan.accdb") & ";"

Set sqlProj = CreateObject("ADODB.Command") ' 
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") & ";"
' 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.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.Prepared = true
sqlStage.commandtext = "SELECT tStage FROM tbl_Stages"
set rsStage = sqlStage.execute

Set sqlTask = CreateObject("ADODB.Command") ' 
sqlTask.Prepared = true
sqlTask.commandtext = "SELECT tTask FROM tbl_Tasks"
set rsTask = sqlTask.execute
Set sqlTotal = CreateObject("ADODB.Command") ' 
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.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.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)
End If 
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.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&""
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)
end if

' to read up on the CreateParameter, please navigate here:

'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


' 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

' 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

' 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 = "&"
    MM_joinChar = ""
  End If
End Function
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
<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. %>
<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="">
          <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" />
     <td width="175" height="40" valign="middle"><h4><a href="/External/Technical.asp">Technical 
      <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="" target="_blank"><img src="/Images/HMY-ID.gif" alt="HMY Website" width="116" height="42" border="0" /></a></div></td>
  <table width="90%" height="30" border="0" cellpadding="5" cellspacing="0" >
      <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 
      <td width="92" height="40"><h5><he><a href="../QA.asp">QA 
      <td width="92" height="40"><h5><he><a href="../ProjData.asp">Project 
      <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 
      <td width="92" height="40"><div align="right"> 
          <h5><a href="../ExterLink.asp">Useful 
  <table width="90%" height="50" border="0" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">
      <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 
      <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>
  <table width="90%" border="0" cellspacing="0" cellpadding="3">
      <td><h1 align="left">HMY Timesheet</h1></td>
      <td><table width="100%" border="0" cellspacing="0" cellpadding="3">
            <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> 
                <%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 />
            <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")%>" />
            <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 %>
            <td><table style="width:100%; border:0px; text-align:center;" cellpadding="5" cellspacing="0">
                  <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">
                        <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">
                                  <td colspan="12"> <table style="width:100%; border:0px;" cellspacing="0" cellpadding="3">
                                        <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 class="tdHeaderTop">Employee: 
                                          <input name="UserNameCh2" type="text" id="UserNameCh5" value="<%=rsTime("tEmployeeNum")%>" /> 
                                  <td class="tdHeader"><font size="-1">Project 
                                  <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>
			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"%>
                                  <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>
				  If (rsProj.CursorType > 0) Then
				  End If
                                  <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>
				  If (rsStage.CursorType > 0) Then
				  End If
                                  <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>
				  If (rsTask.CursorType > 0) Then
				  End If
                                  <td class="tdHeader"> <font size="-1"> 
                                    <input name="tMon_<%=row%>" type="text" id="tMon_<%=row%>3" class="smallerText" value="<%=rsTime("tMon")%>" size="3" />
                                  <td class="tdHeader"> <font size="-1"> 
                                    <input name="tTues_<%=row%>" type="text" id="tTues_<%=row%>3" class="smallerText" value="<%=rsTime("tTues")%>" size="3" />
                                  <td class="tdHeader"> <font size="-1"> 
                                    <input name="tWed_<%=row%>" type="text" id="tWed_<%=row%>3" class="smallerText" value="<%=rsTime("tWed")%>" size="3" />
                                  <td class="tdHeader"> <font size="-1"> 
                                    <input name="tThurs_<%=row%>" type="text" id="tThurs_<%=row%>3" class="smallerText" value="<%=rsTime("tThurs")%>" size="3" />
                                  <td class="tdHeader"> <font size="-1"> 
                                    <input name="tFri_<%=row%>" type="text" id="tFri_<%=row%>3" class="smallerText" value="<%=rsTime("tFri")%>" size="3" />
                                  <td class="tdHeader"> <font size="-1"> 
                                    <input name="tSat_<%=row%>" type="text" id="tSat_<%=row%>3" class="smallerText" value="<%=rsTime("tSat")%>" size="3" />
                                  <td class="tdHeader"> <font size="-1"> 
                                    <input name="tSun_<%=row%>" type="text" id="tSun_<%=row%>3" class="smallerText" value="<%=rsTime("tSun")%>" size="3" />
                                  <td class="tdHeader"> <font size="-1"> 
                                    <%	Dim MyNum
	Mynum =rsTime("tMon")+rsTime("tTues")+rsTime("tWed")+rsTime("tThurs")+rsTime("tFri")+rsTime("tSat")+rsTime("tSun")
                                    <input type="hidden" name="tID_<%=row%>" value="<%= rsTime("tID")%>" />
                                  <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"
return (w)?false:true">Details</a></font></td>
rsTime.movenext ' Move to then next record
                                  <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")
                                    <input type="hidden" name="row" value="<%=row%>" />
                                    <%'this counts the rows that we have in the <form>%>
                                  <td class="tdHeader" style="text-align:center;">&nbsp;</td>
                    <table style="width:100%; border:0px; text-align:left;" cellspacing="0" cellpadding="3">
                        <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")%>" />
                          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>
                    <form name="CloseFrm" id="CloseFrm" action="../News.asp">
                      <input name="CloseFrm" type="submit" id="CloseFrm" value="Close" />
<p>&nbsp; </p>

Set rsProj = Nothing
Set rsTime = Nothing
Set rsTotal = Nothing
Set rsPass = Nothing
Set rsLogin = Nothing
set objconn = nothing
<%end if%>

Open in new window

Question by:GegH
  • 4
  • 3

Expert Comment

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


Author Comment

ID: 36520910
Where do i put this?
LVL 13

Expert Comment

ID: 36520950
this might be the solution,
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

LVL 13

Expert Comment

ID: 36520953
opps, you have used that...
LVL 13

Expert Comment

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.

Author Comment

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

Accepted Solution

khairil earned 2000 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]
"sCountry"="United Kingdom"
"sLongDate"="dd MMMM yyyy"
"sYearMonth"="MMMM yyyy"

Open in new window


Author Closing Comment

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.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System ( introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

607 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