Help!!!!!! - trouble with Windows2000 and ASP Date

Results 1 to 3 of 3

Thread: Help!!!!!! - trouble with Windows2000 and ASP Date

  1. #1
    Join Date
    Dec 1969

    Default Help!!!!!! - trouble with Windows2000 and ASP Date

    We have built an intranet site which is heavily date reliant and uses about 60 pages, most of which display date data in Text controls. The data is read from and written to a SQL2000 database using ADO.<BR><BR>The system was built and tested on NT4 SQL Server 7. The Web Server is the Database Server (only a small number of users and smallish database). When on NT4 Server the regional settings used a small date format of dd mmm yyyy. All the dates on the web pages then displayed in this format. An eleventh hour change by the client to Windows 2000 and SQL 2000 has caused a problem. All the dates are coming through as mm/dd/yyyy which is not acceptible to the client.<BR><BR>We have changed the regional settings (and default settings) on the Server to dd mmm yyyy, and the database to English British format. No help. We have tried LCID = XXXX, no good.<BR><BR>At this stage rewriting all the pages to use a custom date formatting routine is not realy an option. Anyone got any ideas???

  2. #2
    Join Date
    Dec 1969

    Default solved

    had the same prob in the beginning, here&#039;s how to make the date into any format you want:<BR>&#060;%<BR>todaydate = Date() <BR>varFld = CDate(todaydate) <BR><BR>intMonth = Month(varFld) <BR>intDay = Day(varFld) <BR>intYr = Year(varFld) <BR><BR>If intMonth &#060; 10 Then <BR>strMonth = "0" & CStr(intMonth) <BR>Else <BR>strMonth = CStr(intMonth) <BR>End If <BR><BR>If intDay &#060; 10 Then <BR>strDay = "0" & CStr(intDay) <BR>Else <BR>strDay = CStr(intDay) <BR>End If <BR>&#039;this line is where you can cut and past/remove the - if you want<BR>varFld = CStr(intYr & "-" & strMonth & "-" & strDay) <BR>%&#062;<BR><BR>then in your page you put &#060;%=varFLD%&#062;

  3. #3
    Join Date
    Dec 1969

    Default Xander deserves the credit

    he does...he does!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts