Results 1 to 2 of 2

Thread: ASP & Y2K

  1. #1
    Kevin C. Guest

    Default ASP & Y2K

    We are in the process of using ASP for several projects my company is involved in. The possibility is there to outsource some of this work in the future. However we are concerned about Y2K. What are the complications with use ASP? Will any conflicts occur if ASP is being used with Access? Any assistance would be very much appreciated regarding this matter.

  2. #2
    Cable Guest

    Default RE: ASP & Y2K

    It depends on how the user is entering dates and how the ASP page handles dates. You must make sure that the user enters dates in the four digit year format, and that any area that the ASP handles dates is using a Y2K format for dates.<BR><BR>One function to force a Y2K date format (For the USA anyway) is:<BR><BR>Function Y2KDate(v_date)<BR>Dim v_temp<BR><BR>&#039Parse out the Month, Day, and Year into a string<BR><BR>If Trim("" & v_date) &#060;&#062; "" And IsDate(v_date) Then &#039 If Not Null or Empty parse out the date<BR> v_temp = Month(v_date) & "/" & Day(v_date) & "/" & Year(v_date)<BR>Else<BR> v_temp = ""<BR>End If<BR><BR>A Function for checking for a Valid Y2K date is:<BR><BR>Function Valid_Y2K(s_Date)<BR>Dim b_s_DateOK <BR>Dim d_Date <BR>Dim i_Year, i_Month, i_Day <BR><BR> b_s_DateOK = 0<BR> If IsDate(s_Date) Then &#039VBScript says it&#039s a valid date<BR> <BR> d_Date = CDate(s_Date) &#039Convert to date format<BR> i_Year = Year(d_Date) &#039 4 digit year<BR> i_Month = Month(d_Date) &#039 2 digit month<BR> i_Day = Day(d_Date) &#039 2 digit day of month<BR> If InStr(1, s_Date, i_Year) And Len(i_Year) = 4 Then &#039the entered year is the same as the interpretted year and is 4 digits<BR> b_s_DateOK = 1 &#039Valid Y2K Compliant Date<BR> Else<BR> b_s_DateOK = 0 &#039Year digits do not match, not a valid Y2K Date<BR> End If<BR> Else &#039the variable is not in a recognizable date format<BR> b_s_DateOK = 0 &#039Not a Valid Date at all!<BR> End If<BR><BR> Valid_Y2K = b_s_DateOK<BR>End Function<BR><BR>Also visit any Y2K site for the software you are using, in the case of Access, visit and look for the documents on Y2K issues with Access and another for ASP.

Posting Permissions

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